pub struct RepeatBackwardArgs<'a, T: Element, const N: usize> {
pub dy: TensorRef<'a, T, N>,
pub dx: TensorMut<'a, T, N>,
}Expand description
Args bundle for a Repeat backward launch.
dy.shape must match the forward output shape (input_shape[d] * repeats[d] per axis). dx.shape must match desc.input_shape. No
saved forward tensors are needed — the BW formula is a pure sum over
dy.
Fields§
§dy: TensorRef<'a, T, N>Upstream gradient — full forward output shape.
dx: TensorMut<'a, T, N>Gradient w.r.t. the forward input — input shape.
Auto Trait Implementations§
impl<'a, T, const N: usize> !UnwindSafe for RepeatBackwardArgs<'a, T, N>
impl<'a, T, const N: usize> Freeze for RepeatBackwardArgs<'a, T, N>
impl<'a, T, const N: usize> RefUnwindSafe for RepeatBackwardArgs<'a, T, N>where
T: RefUnwindSafe,
impl<'a, T, const N: usize> Send for RepeatBackwardArgs<'a, T, N>
impl<'a, T, const N: usize> Sync for RepeatBackwardArgs<'a, T, N>where
T: Sync,
impl<'a, T, const N: usize> Unpin for RepeatBackwardArgs<'a, T, N>
impl<'a, T, const N: usize> UnsafeUnpin for RepeatBackwardArgs<'a, T, N>
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