Skip to content

Commit

Permalink
added some comments in the example script about naming conventions fo…
Browse files Browse the repository at this point in the history
…r saving snapshots
  • Loading branch information
gray95 committed Apr 10, 2024
1 parent 4535143 commit ac6c54c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/scalar_affine.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ def main(kappa=0.67, m_sq=-4*0.67, lambd=0.5, n_epochs=1000, batch_size=128,
else:
hyperparam = dict()

snaps_dir = "../torch-snapshots"
snaps_name= "test_scalar_affine.E200.tar" # if exists resume from here <name>.epoch.tar
snaps_dir = "../torch-snapshots" # folder in which snapshots are stored
# saved snaps MUST BE "<name>.<epoch>.tar"
snaps_name= "test_scalar_affine.E200.tar" # if <snaps_name> exists resume training from there
snaps_path = os.path.join(snaps_dir, snaps_name)
# snaps_path = '0' # set to 0 if you don't want to save any snapshots
# snaps_path = '0' # set to '0' if you don't want to save any snapshots
fit_kwargs = dict(
n_epochs=n_epochs,
save_every=100,
Expand Down

0 comments on commit ac6c54c

Please sign in to comment.