Update gpt2-genesis.py
@@ -137,7 +137,6 @@ class Session():
# --- Loop forever ---
while True:
- try:
self.epoch += 1
# ---- Serve ----
@@ -172,12 +171,6 @@ class Session():
torch.save( {'epoch': self.epoch, 'model': self.model.state_dict(), 'loss': self.best_train_loss},"{}/model.torch".format(self.config.session.full_path))
self.tensorboard.add_scalar('Neuron/Train_loss', self.training_loss, self.global_step)
- # --- Catch Errors ----
- except Exception as e:
- logger.error('Exception in training script with error: {}', e)
- logger.info(traceback.print_exc())
- logger.info('Continuing to train.')
-
# ---- Train Epoch ----
def train(self):
self.training_loss = 0.0
