Why do I get error "Invalid training data for multiple-input network" while training deep neural networks with multiple image inputs?
Ältere Kommentare anzeigen
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 a
network with 2 inputs and 1 output, the datastore read
function must return an M-by-3 cell array, but it
returns an M-by-2 cell array.
I am using following documentation page as reference:
How to resolve this issue?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!