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', ...

Réponses (1)

Tony Mackenzie
Tony Mackenzie le 5 Fév 2018
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.

Catégories

En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by