Train a trained object detector with more epochs

2 views (last 30 days)
Hello,
I already trained a object detector with following code:
% Training option settings
options = trainingOptions('sgdm', ...
'MiniBatchSize', 1, ...
'InitialLearnRate', 1e-3, ...
'MaxEpochs', 5, ...
'VerboseFrequency', 200, ...
'CheckpointPath', tempdir);
detector = trainFasterRCNNObjectDetector(trainingData, layers, options)
I would like to train more epochs based on above codes and do not re-run the script.
How can I do?
Thank you!
Eric

Accepted Answer

Hao Yu Wang
Hao Yu Wang on 15 Mar 2019
First of all, the title is not clear.
But my condition is different from the offcical website example. I used function trainFasterRCNNObjectDetector and the type of my network is DAGNetwork. As a result, the solution for my situation is shown below
load('rcnn.mat'); % Load previously trained network.
net = layerGraph(rcnn.Network); % Transform DAGNetwork to make it excutable for trainFasterRCNNObjectDetector.
rcnn = trainFasterRCNNObjectDetector(trainingImages, layerGraph(net), options);
save('rcnn.mat', 'rcnn'); % Save trained network.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!