|
| constexpr | ConstrainedStep ()=default |
| constexpr | ConstrainedStep (double v) |
| | constructor
|
| constexpr double | accuracy () const |
| | Access the accuracy value.
|
| constexpr void | release (Type type) |
| | release a certain constraint value
|
| constexpr void | releaseAccuracy () |
| | release accuracy
|
| constexpr void | setAccuracy (double v) |
| | set accuracy
|
| constexpr void | setUser (double v) |
| | set user
|
| std::ostream & | toStream (std::ostream &os) const |
| | Stream the constrained step into an output stream.
|
| std::string | toString () const |
| | Convert the constrained step to a string representation.
|
| constexpr void | update (double v, Type type) |
| | Update the step size of a certain type.
|
| constexpr double | value () const |
| | returns the min step size
|
| constexpr double | value (Type type) const |
| | Access a specific value.
|
A constrained step class for the steppers.
This class is symmetrical for forward and backward propagation. The sign of the propagation direction should not enter here but rather be applied the step is actually taken.
As simple as this class looks it hides a few very important details:
- Overstepping handling. The step size sign will flip if we happened to pass our target.
- Convergence handling. Smaller and smaller step sizes have to be used in order to converge on a target.
Because of the points mentioned above, the update function will always prefer negative step sizes. A side effect of this is that we will propagate in the opposite direction if the target is "behind us".
The hierarchy is:
- Overstepping resolution / backpropagation
- Convergence
- Step into the void with std::numeric_limits<double>::max()