Error using trainNetwork (line 170)

when I trained a vgg16(), I typed 「[net, info] = trainNetwork(datasource,lgraph,options);」.
And i got an error 「Error using trainNetwork (line 170)
The height and width of an image and its corresponding pixel labeled image must be equal if DataAugmentation is specified or if OutputSizeMode
is 'randcrop' or 'centercrop'.」.
Does anyone know how to fix it?

Respuestas (1)

Cris LaPierre
Cris LaPierre el 3 de En. de 2021

0 votos

It would appear you have images and pixel labeled images in your image datastore datasource. These images do not have the same size.
To fix this error, you must either ensure the images and their pixel labeled equivalent have the same height and width, or you must set your options so that DataAugmentation is not specified, and OutputSizeMode is not 'randcrop' or 'centercrop'.

Etiquetas

Preguntada:

el 3 de En. de 2021

Respondida:

el 3 de En. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by