Commit ef28b2c7 authored by lukovnikov's avatar lukovnikov
Browse files

branches, optim cosine fix

parent 90430ae7
......@@ -26,7 +26,7 @@ logger = logging.getLogger(__name__)
def warmup_cosine(x, warmup=0.002):
if x < warmup:
return x/warmup
x_ = (x - warmup) / (1 - warmup) # progress after warmup
x_ = (x - warmup) / (1 - warmup) # progress after warmup -
return 0.5 * (1. + math.cos(math.pi * x_))
def warmup_constant(x, warmup=0.002):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment