How to use a trained convolutional network when input has only 1 channel?

1 回表示 (過去 30 日間)
wenyi
wenyi 2018 年 8 月 13 日
Hi experts,
I have used [XTrain,YTrain] = digitTrain4DArrayData; to obtain 5000 images with size 28*28*1. They are handwriting images with only 1 channel. I followed the Guide Manual to create and train a convolutional network successfully. And then, I want to use the trained net by using
Y=net(X);
where, X is a 28*28 image. Because it has only one channel, MATLAB reduces it from 28*28*1 to 28*28 automatically. So the input format becomes wrong! It returns
"Array indices must be positive integers or logical values."
I checked on MATLAB webpage. All about the introduction is how to train the network, they do not even show a single example to test using the trained network by their 28*28*1 images. So did anybody of you have tried inputing something into the network (trained with 28*28*1 images)? What did you get? Thanks.

回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by