(global_step,
total_steps,
warmup=0.002,
)
| 65 | return (1.0 - x)**degree |
| 66 | |
| 67 | def warmup_linear_decay_linear(global_step, |
| 68 | total_steps, |
| 69 | warmup=0.002, |
| 70 | ): |
| 71 | x = global_step / total_steps # x is the propotion of the updated steps wrt total steps |
| 72 | if x < warmup: |
| 73 | return x / warmup |
| 74 | else: |
| 75 | return 1.0 - (x - warmup)/(1.0 - warmup) |
no outgoing calls
no test coverage detected