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

Respuestas (1)

Tony Mackenzie
Tony Mackenzie el 5 de Feb. de 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.

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 31 de En. de 2018

Respondida:

el 5 de Feb. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by