Why do I get error "Invalid training data for multiple-input network" while training deep neural networks with multiple image inputs?
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!