Struct burn_core::nn::attention::GeneratePaddingMask
source · pub struct GeneratePaddingMask<B: Backend> {
pub tensor: Tensor<B, 2, Int>,
pub mask: Tensor<B, 2, Bool>,
}Expand description
Generate a padding attention mask.
Fields§
§tensor: Tensor<B, 2, Int>The generated tensor.
mask: Tensor<B, 2, Bool>The generated mask.
Auto Trait Implementations§
impl<B> RefUnwindSafe for GeneratePaddingMask<B>where
<B as Backend>::BoolTensorPrimitive<2>: RefUnwindSafe,
<B as Backend>::IntTensorPrimitive<2>: RefUnwindSafe,
impl<B> Send for GeneratePaddingMask<B>
impl<B> Sync for GeneratePaddingMask<B>
impl<B> Unpin for GeneratePaddingMask<B>
impl<B> UnwindSafe for GeneratePaddingMask<B>where
<B as Backend>::BoolTensorPrimitive<2>: UnwindSafe,
<B as Backend>::IntTensorPrimitive<2>: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more