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

4 ビュー (過去 30 日間)
Md Abdur Rahman
Md Abdur Rahman 2021 年 5 月 17 日
回答済み: T.Nikhil kumar 2023 年 10 月 10 日
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'.

回答 (1 件)

T.Nikhil kumar
T.Nikhil kumar 2023 年 10 月 10 日
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!

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by