pub struct SparsemaxDescriptor<const N: usize> {
pub input_shape: [i32; N],
pub softmax_axis: u8,
pub element: ElementKind,
}Expand description
Descriptor for a Sparsemax forward op.
Fields§
§input_shape: [i32; N]Tensor shape (input and output share it).
softmax_axis: u8Axis along which to apply sparsemax. Must be in [0, N).
Extent along this axis must be <= SPARSEMAX_MAX_EXTENT.
element: ElementKindElement type.
Trait Implementations§
Source§impl<const N: usize> Clone for SparsemaxDescriptor<N>
impl<const N: usize> Clone for SparsemaxDescriptor<N>
Source§fn clone(&self) -> SparsemaxDescriptor<N>
fn clone(&self) -> SparsemaxDescriptor<N>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<const N: usize> Copy for SparsemaxDescriptor<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for SparsemaxDescriptor<N>
impl<const N: usize> RefUnwindSafe for SparsemaxDescriptor<N>
impl<const N: usize> Send for SparsemaxDescriptor<N>
impl<const N: usize> Sync for SparsemaxDescriptor<N>
impl<const N: usize> Unpin for SparsemaxDescriptor<N>
impl<const N: usize> UnsafeUnpin for SparsemaxDescriptor<N>
impl<const N: usize> UnwindSafe for SparsemaxDescriptor<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