Skip to content

Commit

Permalink
Fix number of epochs at training
Browse files Browse the repository at this point in the history
  • Loading branch information
Srinivas Rana authored and Srinivas Rana committed Mar 14, 2022
1 parent 2bbea4c commit 312d24f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bonito/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def fit(self, workdir, epochs=1, lr=2e-3, **optim_kwargs):

lr_scheduler = self.get_lr_scheduler(epochs, last_epoch=last_epoch)

for epoch in range(1 + last_epoch, epochs + 1 + last_epoch):
for epoch in range(1 + last_epoch, epochs + 1):
try:
with bonito.io.CSVLogger(os.path.join(workdir, 'losses_{}.csv'.format(epoch))) as loss_log:
train_loss, duration = self.train_one_epoch(loss_log, lr_scheduler)
Expand Down

0 comments on commit 312d24f

Please sign in to comment.