klyn.math.nn.layers.Dropout.forwardTraining
method
public override forwardTraining(inputs as NDArray<T>) as LayerPass<T>
Description

Samples a fresh mask and retains it only in the returned context.

Parameters
ParameterDescription
inputsBatch tensor; never modified.
Returns

Output and one byte per element of keep flags, or identity for rate=0.

Example

context = dropout.forwardTraining(batch)