Created
November 12, 2021 17:32
-
-
Save amallia/eeb33a114320b8389caa84fee0c41894 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkpoint_callback = ModelCheckpoint(dirpath=os.path.join( | |
os.getcwd(), "checkpoints"), filename='step{step:02d}-train_loss{train_loss:.3f}', auto_insert_metric_name=False, verbose=True, every_n_train_steps=250) | |
trainer = pl.Trainer.from_argparse_args( | |
args, callbacks=[checkpoint_callback], accumulate_grad_batches=2, gradient_clip_val=2) | |
trainer.fit(model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment