Commit 7b4b0cf9 authored by thomwolf's avatar thomwolf
Browse files

logging

parent 4bbb9f2d
...@@ -202,7 +202,7 @@ def main(): ...@@ -202,7 +202,7 @@ def main():
tr_loss += loss.item() tr_loss += loss.item()
nb_tr_examples += input_ids.size(0) nb_tr_examples += input_ids.size(0)
nb_tr_steps += 1 nb_tr_steps += 1
tqdm_bar.desc = "Training loss: {:e.2}".format(tr_loss/nb_tr_steps) tqdm_bar.desc = "Training loss: {:.2e}".format(tr_loss/nb_tr_steps)
# Save a trained model # Save a trained model
model_to_save = model.module if hasattr(model, 'module') else model # Only save the model it-self model_to_save = model.module if hasattr(model, 'module') else model # Only save the model it-self
......
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