Can we use 'sequenceInputLayer(inputSize)' with 'featureInputLayer' in multiple input deep convolutional neural network?
Show older comments
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 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.
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!