Skip to content

Commit

Permalink
Decrease number of checkpoints saved
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenvivek committed Jan 12, 2024
1 parent 716901b commit 5d247c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions experiments/deepfluoro/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def train(
best_loss = torch.inf

model.train()
for epoch in range(n_epochs):
for epoch in range(n_epochs + 1):
losses = []
for _ in (itr := tqdm(range(n_batches_per_epoch), leave=False)):
contrast = contrast_distribution.sample().item()
Expand Down Expand Up @@ -144,7 +144,7 @@ def train(
f"checkpoints/specimen_{id_number:02d}_best.ckpt",
)

if epoch % 25 == 0 and epoch != 0:
if epoch % 50 == 0:
torch.save(
{
"model_state_dict": model.state_dict(),
Expand Down

0 comments on commit 5d247c0

Please sign in to comment.