Commit 4810e6e6 authored by Andrei Roibu's avatar Andrei Roibu
Browse files

initialising previous checkpoint, loss, mse with the solver

parent 171d95ec
......@@ -133,15 +133,16 @@ class Solver():
self.best_score_early_stop = None
self.counter_early_stop = 0
self.previous_checkpoint = None
self.previous_loss = None
self.previous_MSE = None
if use_last_checkpoint:
self.load_checkpoint()
self.EarlyStopping = EarlyStopping(patience=2, min_delta=0, best_score=self.best_score_early_stop, counter=self.counter_early_stop)
else:
self.EarlyStopping = EarlyStopping(patience=2, min_delta=0)
self.previous_checkpoint = None
self.previous_loss = None
self.previous_MSE = None
def train(self, train_loader, validation_loader):
"""Training Function
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment