From: Francois Fleuret Date: Fri, 16 Jun 2017 13:45:55 +0000 (+0200) Subject: Minor ETA fix. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=1c9bd2174185daa35eab4e71fbfe399bd9dec46a;p=pysvrt.git Minor ETA fix. --- diff --git a/cnn-svrt.py b/cnn-svrt.py index 06e58bd..592f982 100755 --- a/cnn-svrt.py +++ b/cnn-svrt.py @@ -159,7 +159,7 @@ def train_model(model, train_set): loss.backward() optimizer.step() log_string('train_loss {:d} {:f}'.format(e + 1, acc_loss)) - dt = (time.time() - t) / (e + 1) + dt = (time.time() - start_t) / (e + 1) print(Fore.CYAN + 'ETA ' + time.ctime(time.time() + dt * (args.nb_epochs - e)) + Style.RESET_ALL) return model