MCPcopy Create free account
hub / github.com/GanjinZero/BioBART / warmup_linear

Function warmup_linear

pretrain_src/optimization_utils.py:20–25  ·  view source on GitHub ↗
(x, warmup=0.002)

Source from the content-addressed store, hash-verified

18
19
20def warmup_linear(x, warmup=0.002):
21 if warmup == 0.0:
22 return 1.0
23 elif x < warmup:
24 return x / warmup
25 return 1.0 - x
26
27
28def warmup_linear_decay_exp(global_step,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected