Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

bugfix - cosine scheduler with warmup steps #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def cosine_scheduler(base_value, final_value, epochs, niter_per_ep, warmup_epoch
if warmup_steps > 0:
warmup_iters = warmup_steps
print("Set warmup steps = %d" % warmup_iters)
if warmup_epochs > 0:
if warmup_iters > 0:
warmup_schedule = np.linspace(start_warmup_value, base_value, warmup_iters)

iters = np.arange(epochs * niter_per_ep - warmup_iters)
Expand Down