Error in 'trainNetwork' (line 141) for multi-input and single output CNN model

4 vues (au cours des 30 derniers jours)
Md Abdur Rahman
Md Abdur Rahman le 17 Mai 2021
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'.

Réponses (1)

T.Nikhil kumar
T.Nikhil kumar le 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!

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by