MCPcopy Create free account
hub / github.com/NVlabs/InstantSplat / helper

Function helper

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected