Skip to content
fn

drop_block_op

→TensorImplPtr
int drop_block_op(const int & a, int block_size, double p, double eps, Generator * gen)

DropBlock — structured spatial dropout — free-function entry point.

Thin wrapper that delegates to DropBlockBackward::forward.

Parameters

aTensorImplPtr
4-D input tensor of shape (N, C, H, W).
block_sizestd::int64_t
Side length of each dropped spatial block.
pdouble
Target block-level drop probability in [0,1)[0, 1).
epsdouble
Numerical guard for the γ\gamma denominator.
Optional RNG; nullptr selects default_generator().

Returns

TensorImplPtr

Output tensor of the same shape as a.