opt["num_epochs"], self.train_time.time()))
self.log()
break
if opt["max_train_time"] > 0 and self.train_time.time() > opt["max_train_time"]:
print("[ max_train_time elapsed:{}s ]".format(self.train_time.time()))
break
if opt["log_every_n_secs"] > 0 and self.log_time.time() > opt["log_every_n_secs"]:
self.log()
if (opt["validation_every_n_secs"] > 0 and
self.validate_time.time() > opt["validation_every_n_secs"]):
After Change
if self.total_epochs > self.num_epochs or world_done:
print("[ num_epochs completed:{} time elapsed:{}s ]".format(
self.num_epochs, world.get_train_time()))
self.log()
break
if world.get_train_time() > self.max_train_time: