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

Answers (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.

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Asked:

on 31 Jan 2018

Answered:

on 5 Feb 2018

Community Treasure Hunt

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

Start Hunting!