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

1 visualización (últimos 30 días)
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'.

Respuestas (1)

T.Nikhil kumar
T.Nikhil kumar el 10 de Oct. de 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!

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by