MCPcopy Create free account
hub / github.com/YeWR/EfficientZero / __init__

Method __init__

core/utils.py:15–31  ·  view source on GitHub ↗

Linear interpolation between initial_p and final_p over schedule_timesteps. After this many timesteps pass final_p is returned. Parameters ---------- schedule_timesteps: int Number of timesteps for which to linearly anneal initial_p to

(self, schedule_timesteps, final_p, initial_p=1.0)

Source from the content-addressed store, hash-verified

13
14class LinearSchedule(object):
15 def __init__(self, schedule_timesteps, final_p, initial_p=1.0):
16 """Linear interpolation between initial_p and final_p over
17 schedule_timesteps. After this many timesteps pass final_p is
18 returned.
19 Parameters
20 ----------
21 schedule_timesteps: int
22 Number of timesteps for which to linearly anneal initial_p
23 to final_p
24 initial_p: float
25 initial output value
26 final_p: float
27 final output value
28 """
29 self.schedule_timesteps = schedule_timesteps
30 self.final_p = final_p
31 self.initial_p = initial_p
32
33 def value(self, t):
34 """See Schedule.value"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected