klyn.math.nn.layers.Layer.parameter
method
public abstract parameter(index as Long) as NDArray<T>
Description

Returns a trainable tensor, ordered like the parameter derivatives.

Parameters
ParameterDescription
indexZero-based parameter index.
Returns

Mutable parameter tensor, not a copy.

Throws
  • IndexException for an invalid index; ValueException before build.
Example

weights = layer.parameter(0)