File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ function train(this)
339339 % preprocessing
340340 this.TrainingOptions.ValidationData = ...
341341 augmentedImageDatastore(networkInputSize(1 : 2 ), ...
342- this .TrainingOptions . ValidationData , ...
342+ this .ValidationData , ...
343343 colorPreprocessing= colorPreprocessing );
344344
345345 [this .TrainedNetwork , this .TrainingResults ] = trainnet( ...
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ function canSetTrainingOptions(test)
204204 test .verifyEqual(model .TrainingOptions .MaxEpochs , 17 );
205205 end
206206
207- function trainsNetworK (test )
207+ function trainsNetwork (test )
208208 % We should be able to train the network.
209209
210210 model = test .createSpecimen();
@@ -219,6 +219,22 @@ function trainsNetworK(test)
219219 test .verifyNotEmpty(model .TrainedNetwork );
220220 end
221221
222+ function secondTrainingSuccessful(test )
223+ % Training the model twice with no setting changes should work
224+ % as intended.
225+
226+ model = test .createSpecimen();
227+ test .importTestData(model );
228+ model .setAugmentations(RandRotation = [-5 5 ]);
229+ model .setNetworkFromPretrained(" squeezenet" );
230+ test .configureModelForFastTraining(model );
231+
232+ model .train();
233+ model .train();
234+
235+ test .verifyNotEmpty(model .TrainedNetwork );
236+ end
237+
222238 function predictsOnImage(test )
223239 % We should be able to perform inference on a single new image.
224240
You can’t perform that action at this time.
0 commit comments