Can we use ‘sequenceInputLayer(inputSize)’ with ‘featureInputLayer’ in multiple input deep convolutional neural network?
I am using a network with multiple input CNN network, where one is sequence input and second one is feature input. The combined datastore was created as follows:
dsX1Train = arrayDatastore(XTrainD);
dsX2Train = arrayDatastore(XTrainf);
dsTTrain = arrayDatastore(XTrainL);
dsTrain = combine(dsX1Train,dsX2Train,dsTTrain);
Here ‘XTrainD’ is of size 800-by-1 cell where each row consists of 1-by-1-by-800 (single) sequence data. ‘XTrainf’ is feature of 800-by-1 (single) data and ‘XTrainL’ is the categorical data for labels of size 800-by-1. During training using trainnet(),
options = trainingOptions(‘adam’,…
‘Shuffle’,’every-epoch’,…
‘InputDataFormats’,{‘CBT’,’BC’},…
‘MaxEpochs’,50,…
‘MiniBatchSize’,16,…
‘InitialLearnRate’,1e-4,…
‘Verbose’,1,…
‘ExecutionEnvironment’,’cpu’,…
‘Plots’,’training-progress’);
net = trainnet(dsTrain,layer,"crossentropy",options);
some error is shown as below,
Error using trainnet (line 46)
Error forming mini-batch for network input "input_1". Data interpreted with format "CBT". To specify a different format, use the InputDataFormats option.
Caused by:
Input sequences must be numeric or categorical arrays.
Am I creating data and the datastore in the right way? Is it possible to train multiple input network using trainnet with one input as sequence input layer? I have used Train Network on Image and Feature Data – MATLAB & Simulink – MathWorks for the reference.
Thanking in advance for the help.I am using a network with multiple input CNN network, where one is sequence input and second one is feature input. The combined datastore was created as follows:
dsX1Train = arrayDatastore(XTrainD);
dsX2Train = arrayDatastore(XTrainf);
dsTTrain = arrayDatastore(XTrainL);
dsTrain = combine(dsX1Train,dsX2Train,dsTTrain);
Here ‘XTrainD’ is of size 800-by-1 cell where each row consists of 1-by-1-by-800 (single) sequence data. ‘XTrainf’ is feature of 800-by-1 (single) data and ‘XTrainL’ is the categorical data for labels of size 800-by-1. During training using trainnet(),
options = trainingOptions(‘adam’,…
‘Shuffle’,’every-epoch’,…
‘InputDataFormats’,{‘CBT’,’BC’},…
‘MaxEpochs’,50,…
‘MiniBatchSize’,16,…
‘InitialLearnRate’,1e-4,…
‘Verbose’,1,…
‘ExecutionEnvironment’,’cpu’,…
‘Plots’,’training-progress’);
net = trainnet(dsTrain,layer,"crossentropy",options);
some error is shown as below,
Error using trainnet (line 46)
Error forming mini-batch for network input "input_1". Data interpreted with format "CBT". To specify a different format, use the InputDataFormats option.
Caused by:
Input sequences must be numeric or categorical arrays.
Am I creating data and the datastore in the right way? Is it possible to train multiple input network using trainnet with one input as sequence input layer? I have used Train Network on Image and Feature Data – MATLAB & Simulink – MathWorks for the reference.
Thanking in advance for the help. I am using a network with multiple input CNN network, where one is sequence input and second one is feature input. The combined datastore was created as follows:
dsX1Train = arrayDatastore(XTrainD);
dsX2Train = arrayDatastore(XTrainf);
dsTTrain = arrayDatastore(XTrainL);
dsTrain = combine(dsX1Train,dsX2Train,dsTTrain);
Here ‘XTrainD’ is of size 800-by-1 cell where each row consists of 1-by-1-by-800 (single) sequence data. ‘XTrainf’ is feature of 800-by-1 (single) data and ‘XTrainL’ is the categorical data for labels of size 800-by-1. During training using trainnet(),
options = trainingOptions(‘adam’,…
‘Shuffle’,’every-epoch’,…
‘InputDataFormats’,{‘CBT’,’BC’},…
‘MaxEpochs’,50,…
‘MiniBatchSize’,16,…
‘InitialLearnRate’,1e-4,…
‘Verbose’,1,…
‘ExecutionEnvironment’,’cpu’,…
‘Plots’,’training-progress’);
net = trainnet(dsTrain,layer,"crossentropy",options);
some error is shown as below,
Error using trainnet (line 46)
Error forming mini-batch for network input "input_1". Data interpreted with format "CBT". To specify a different format, use the InputDataFormats option.
Caused by:
Input sequences must be numeric or categorical arrays.
Am I creating data and the datastore in the right way? Is it possible to train multiple input network using trainnet with one input as sequence input layer? I have used Train Network on Image and Feature Data – MATLAB & Simulink – MathWorks for the reference.
Thanking in advance for the help. signal processing, image analysis, image processing, image segmentation, deep learning, machine learning, neural network, neural networks, convolutional neural network, sequential input layer, feature input layer, trainnet, dlnetwork, training, testing MATLAB Answers — New Questions