Error in 'trainNetwork' (line 141) for multi-input and single output CNN model
1 view (last 30 days)
Show older comments
Hi,
I am working on a CNN model with 2 images as input and single image as output. The code for training is as follows:
trainedNet = trainNetwork(cmImds,lgraph,options);
where, cmImds contains 3 columns in each row i.e. 2 for 2 input images and last column is for output image.
I am having the the forlling problem during training:
Error using trainNetwork (line 184)
Duplicate table variable name: 'input'.
Error in mainCode (line 34)
trainedNet = trainNetwork(dlX,lgraph,options);
Caused by:
Error using matlab.io.datastore.CombinedDatastore/read (line 141)
Duplicate table variable name: 'input'.
0 Comments
Answers (1)
T.Nikhil kumar
on 10 Oct 2023
Hey Abdur,
As per my understanding, you are working with a multiple input layer CNN with two image inputs and want to train it to give an image as an output using the ‘trainNetwork’ function.
The error message informs you that there is a discrepancy in naming in the input datastore ‘cmImds’ provided to the ‘trainNetwork’ function. Specifically, the variable name ‘input’ has been used for more than one column. In MATLAB, each column in a datastore must have a unique variable name. Therefore, I would suggest you verify if the name ‘input’ has been used more than once as variable name and assign unique names for each column.
I would also suggest you follow the exact input format for training multiple input layer neural network as mentioned in the following documentation.
Hope this helps!
0 Comments
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!