How to apply CNN code on an input image with 3channels

1 ビュー (過去 30 日間)
Jongkyu Lee
Jongkyu Lee 2021 年 2 月 24 日
回答済み: Mahesh Taparia 2021 年 2 月 27 日
I am trying to apply regression through CNN on 3ch of image data composed of RGB.
So, referring to https://kr.mathworks.com/help/deeplearning/ug/train-a-convolutional-neural-network-for-regression.html, I entered the following to compose the training data.
[XTrain,YTrain] = voltage_img;
The variable voltage_img is (434*343*3*310), which is 4-D. When I run the above code, I get an error saying that there are too many output arguments.
How can I fix it?

回答 (1 件)

Mahesh Taparia
Mahesh Taparia 2021 年 2 月 27 日
Hi
Looking at the dimension of voltage_img (which you mentioned), it seems it only contains the training input which consists of 310 images of size 434X343X3. There is no information about the ground truth. So effectively it is XTrain and it does not contains YTrain. So, assign the training input to XTrain and labels to YTrain and then follow the example. Hope it will work!

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by