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?
回答(1 个)
Cris LaPierre
2021-1-3
0 个投票
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'.
类别
在 帮助中心 和 File Exchange 中查找有关 Semantic Segmentation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!