Closed LuoXueling closed 11 months ago
Explanation of the unit test:
min_delta=1000
, so EarlyStopping
always stores the state_dict()
of the first epoch. patience=1000
is not necessary here because n_epochs=2
but I just want to mention that, if only the deep copy thing is fixed, the bug also exists if early stopping is not triggered. Finally, the restored model should have the same validation loss as that in the first epoch.
Thanks for putting this together - will have time to review tomorrow if nobody else gets around to it!
See issue #175