The params keyword declares learnable parameters inside an
autodiff block.
a = 3
autodiff Scalar epochs:1 learningRate:0 with
params a
return (a - 2)^2
show scalar "a" with a
This outputs the following scalar:
a
3
Parameters must be numeric and belong to small tables. If a
parameter variable is defined before the autodiff block, params a uses that
value as initialization.
Bounds and initialization
Use auto(mean, stdev) to control initialization and in [low .. high] to
constrain values. Bounds are inclusive; one side can be omitted. When bounds
are specified, the runtime clamps values to the range and resets momentum when
a bound is hit. If auto is used with bounds, the bounds must be at least
three standard deviations away from the mean.
Abstract and dependent parameters
The abstract modifier declares a parameter vector that is not differentiated
directly. Dependent parameters can be defined from it via lookups.