MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / helper

Function helper

utils/general_utils.py:50–63  ·  view source on GitHub ↗
(step)

Source from the content-addressed store, hash-verified

48 """
49
50 def helper(step):
51 if step < 0 or (lr_init == 0.0 and lr_final == 0.0):
52 # Disable this parameter
53 return 0.0
54 if lr_delay_steps > 0:
55 # A kind of reverse cosine decay.
56 delay_rate = lr_delay_mult + (1 - lr_delay_mult) * np.sin(
57 0.5 * np.pi * np.clip(step / lr_delay_steps, 0, 1)
58 )
59 else:
60 delay_rate = 1.0
61 t = np.clip(step / max_steps, 0, 1)
62 log_lerp = np.exp(np.log(lr_init) * (1 - t) + np.log(lr_final) * t)
63 return delay_rate * log_lerp
64
65 return helper
66

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected