module emote.extra.schedules
Classes
class BPStepScheduler:
Fields
-
bp_step_begin
:float
-
bp_step_end
:float
-
value_min
:float
-
value_max
:float
Methods
def evaluate_at(self, bp) -> None
class Schedule:
Methods
def __init__(self, initial, final, steps) -> None
def value(self) -> None
def step(self) -> None
class ConstantSchedule(Schedule):
Constant value that doesn't change over time.
Methods
def __init__(self, value) -> None
Arguments:
value(float)
: Value of the schedule.
class LinearSchedule(Schedule):
Linear interpolation between initial and final over steps timesteps. After this many timesteps, final is returned.
Methods
def __init__(self, initial, final, steps, use_staircase, staircase_steps) -> None
Arguments:
initial(float)
: Initial value.final(float)
: Final value.steps(int)
: Number of steps.use_staircase(bool)
: Use step like decay. Defaults to False. (default: False)staircase_steps(int)
: The number of discrete steps. Defaults to 5. (default: 5)
def step(self) -> None
class CyclicSchedule(Schedule):
Cyclic schedule. Args: initial (float): Initial value. final (float): Final value. half_period_steps (int): Number of steps in one half of the cycle. mode (str, optional): One of {triangular, triangular2}. Defaults to "triangular".
* triangular: A basic triangular cycle without amplitude scaling.
* triangular2: A basic triangular cycle that scales initial amplitude by half each cycle.
** Note: for triangular2, the final value is the boundary that is scaled down
at each cycle iteration,
meaning that the value of the scheduled parameter will settle around initial.
Methods
def __init__(self, initial, final, half_period_steps, mode) -> None
Arguments:
initial(float)
final(float)
half_period_steps(int)
mode(str)
(default: triangular)
def step(self) -> None
class CosineAnnealing(Schedule):
Cosine annealing schedule.
Methods
def __init__(self, initial, final, steps) -> None
Arguments:
initial(float)
: Initial value.final(float)
: Final value.steps(int)
: Number of steps.
def step(self) -> None
class CosineAnnealingWarmRestarts(Schedule):
Cosine annealing schedule with warm restarts.
Methods
def __init__(self, initial, final, steps) -> None
Arguments:
initial(float)
: Initial value.final(float)
: Final value.steps(int)
: Number of steps.
def step(self) -> None