Training Failed - Deep Network designer

6 ビュー (過去 30 日間)
Shane Philip Abreu
Shane Philip Abreu 2021 年 3 月 17 日
回答済み: Srivardhan Gadila 2021 年 4 月 16 日
I have a training error when trying to retrain an AlexNet on my dataset. I can get the data to work when using a small amount such as 10 images but when I try to use approx 500 in each of the 2 classes it states "Training failed. Augnmented Image Datastore cannot form MiniBatches of data because input images differ in 3rd dimension. Consider using 'ColorPreprocessing option to ensure all augmented images have same number of channels"
Can anyone help please?

回答 (1 件)

Srivardhan Gadila
Srivardhan Gadila 2021 年 4 月 16 日
As the error clearly states, it seems that your data contains a mixture of grayscale and RGB images, use ColorPreprocessing Name-Value pair argument to ensure that all output images have the number of channels required by imageInputLayer of alexnet.
Refer to the description of ColorPreprocessing of AugmentedImageDatastore and Import Data into Deep Network Designer for more information.
Also make sure that all of your images have the size same as alexnet input layer which is
net = alexnet;
inputSize = net.Layers(1).InputSize
inputSize = 1×3
227 227 3
You can set OutputSize of augmentedImageDatastore to [227 227] for this.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by