klyn.math.nn.layers.Dense.differentiate
method
public override differentiate(inputs as NDArray<T>, upstream as NDArray<T>) as LayerGradients<T>
Description

Adapts affine derivatives to the common layer contract.

Parameters
ParameterDescription
inputsOriginal batch.
upstreamOutput derivative.
Returns

Input derivative and ordered weight/bias derivatives.

Example

gradients = layer.differentiate(batch, upstream)