Skip to content
fn

dropout_op

→TensorImplPtr
int dropout_op(const int & a, double p, bool training, Generator * gen)

Python wrappers

Public Python APIs implemented by this engine symbol.

Element-wise inverted dropout — free-function entry point.

Thin wrapper that delegates to DropoutBackward::forward.

Parameters

aTensorImplPtr
Input tensor of any shape.
pdouble
Drop probability in [0,1)[0, 1).
trainingbool
If false, the forward is a pass-through.
Optional RNG; nullptr selects default_generator().

Returns

TensorImplPtr

Output tensor of the same shape as a.