Skip to main content

dropout_mask

Function dropout_mask 

Source
pub fn dropout_mask(
    shape: &[usize],
    p: f64,
    rng: &mut AugRng,
) -> Result<ArrayD<f64>, AugmentationError>
Expand description

Generate a binary dropout mask of the given shape.

Each element is 1.0 with probability (1 − p) and 0.0 with probability p.