Training Failed - Deep Network designer

2 visualizaciones (últimos 30 días)
Shane Philip Abreu
Shane Philip Abreu el 17 de Mzo. de 2021
Respondida: Srivardhan Gadila el 16 de Abr. de 2021
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?

Respuestas (1)

Srivardhan Gadila
Srivardhan Gadila el 16 de Abr. de 2021
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.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by