I have designed a neural network "layerGraph" for binary classification that takes two 3D image inputs. I created a combined datastore from two image datastores and then used it as input argument for "tranNetwork" function.
>> imds_1 = imageDatastore(imds_path_1, 'IncludeSubfolders',true,'LabelSource','foldernames');>> imds_2 = imageDatastore(imds_path_2, 'IncludeSubfolders',true,'LabelSource','foldernames');>> train_ds = combine(imds_1, imds_2);>> net = trainNetwork(combined_ds ,layers,options);
I got the following error during training:
Error using trainNetwork (line ###)Invalid training data for multiple-input network. For anetwork with 2 inputs and 1 output, the datastore readfunction must return an M-by-3 cell array, but itreturns an M-by-2 cell array.
I am using following documentation page as reference:
How to resolve this issue?
Best Answer