MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / linear_lr_warmpup

Function linear_lr_warmpup

trainer/base_trainer.py:411–420  ·  view source on GitHub ↗
(warmup_steps)

Source from the content-addressed store, hash-verified

409
410
411def linear_lr_warmpup(warmup_steps):
412 assert warmup_steps > 0
413
414 def lr_lambda(current_step):
415 if current_step > warmup_steps:
416 return 1.0
417 else:
418 return current_step / warmup_steps
419
420 return lr_lambda

Callers 1

mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected