Can 'ValidationData' be used when training Semantic Segmentation?

How can validation data be used with Semantic Segmentation networks?
I have tried the following:
datasourceTest = pixelLabelImageSource( imdsTest, pxdsTest);
and under training options I have added in:
'ValidationData',datasourceTest,...
but I get the following:
Error using trainingOptions (line 187) The value of 'ValidationData' is invalid. Validation data must be a table, an ImageDatastore, or a cell array with input data and responses. Error in training (line 27) options = trainingOptions('sgdm', ...

回答(1 个)

Found my own solution:
This was not working for me on 2017b but I just downloaded 2018a and tested it out with my test data using:
enddatasourcetrain = pixelLabelImageSource( imdsTrain, pxdsTrain); datasourcetest = pixelLabelImageSource( imdsTest, pxdsTest); options = trainingOptions('sgdm', ... 'Momentum', .9, ... 'InitialLearnRate', 1e-2, ... 'MaxEpochs', 100, ... 'MiniBatchSize',8, ... 'Shuffle', 'every-epoch', ... 'VerboseFrequency', 2,... 'Plots','training-progress',... 'LearnRateDropFactor',0.1,... 'ValidationData', datasourcetest, ... 'LearnRateDropPeriod',100); Now it is working.

类别

帮助中心File Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by