Class schedule::Linear
The schedule (or schedule segment) interpolates linearly from initial
to final
value over the input interval.
Configuration:
- Basic definition:
"schedule": {
"type": "linear",
"initial": 1.0,
"final": 0.3
}
- With input range:
"schedule": {
"type": "linear",
"initial": 1.0,
"final": 0.3
"start": 0,
"stop": 10
}
- With count:
"schedule": {
"type": "linear",
"initial": 1.0,
"final": 0.3
"count": 11
}
Inherited Members
Constructors
Linear()
Declaration
schedule::Linear::Linear()
Linear()
Explicitly create an inverse linear schedule.
This allows algorithms to explicitly create an inverse linear schedule from other input variants (i.e., beta_start
, beta_stop
).
Declaration
schedule::Linear::Linear(double initial_value, double final_value)
Methods
get_progress_value()
Get the value at a relative position in the input interval.
Arguments: progress
relative input position \in [0..1]
Returns: the interpolated value
Declaration
double schedule::Linear::get_progress_value(double progress) const override
configure()
Configure the Linear generator from input.
This expects the initial
and final
value to interpolate.
Declaration
void schedule::Linear::configure(const utils::Json&json) override
render()
Return the config value for schedule.
Declaration
utils::Structure schedule::Linear::render() const override