Skip to content

Commit

Permalink
Update gradient_accumulation_scheduler.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ananthsub committed Sep 19, 2020
1 parent d6df3c7 commit c470b97
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def __init__(self, scheduling: dict):

minimal_epoch = min(scheduling.keys())
if minimal_epoch < 0:
raise IndexError(f"Epochs indexing from 1, epoch {minimal_epoch} cannot be interpreted correct")
raise IndexError(
f"Epochs indexing from 1, epoch {minimal_epoch} cannot be interpreted correct"
)
if minimal_epoch != 0: # if user didnt define first epoch accumulation factor
scheduling.update({0: 1})

Expand Down

0 comments on commit c470b97

Please sign in to comment.