Function burn::nn::attention::generate_autoregressive_mask
pub fn generate_autoregressive_mask<B>(
batch_size: usize,
seq_length: usize,
device: &<B as Backend>::Device,
) -> Tensor<B, 3, Bool>where
B: Backend,
Expand description
Generate an autoregressive attention mask.
The mask can be used in Transformer modules to train models to generate tensors sequentially.