#[repr(i32)]pub enum FillOperation {
kLINSPACE = 0,
kRANDOM_UNIFORM = 1,
kRANDOM_NORMAL = 2,
}Expand description
! ! \enum FillOperation ! ! \brief Enumerates the tensor fill operations that may performed by a fill layer. ! ! \see IFillLayer !
Variants§
kLINSPACE = 0
! Compute each value via an affine function of its indices. ! For example, suppose the parameters for the IFillLayer are: ! ! * Dimensions = [3,4] ! * Alpha = 1 ! * Beta = [100,10] ! ! Element [i,j] of the output is Alpha + Beta[0]*i + Beta[1]*j. ! Thus the output matrix is: ! ! 1 11 21 31 ! 101 111 121 131 ! 201 211 221 231 ! ! A static beta b is implicitly a 1D tensor, i.e. Beta = [b]. ! Output type must be INT32, INT64, or FLOAT.
kRANDOM_UNIFORM = 1
! Randomly draw values from a uniform distribution. ! Output type must be FLOAT or HALF.
kRANDOM_NORMAL = 2
! Randomly draw values from a normal distribution. ! Output type must be FLOAT or HALF.
Trait Implementations§
Source§impl Clone for FillOperation
impl Clone for FillOperation
Source§fn clone(&self) -> FillOperation
fn clone(&self) -> FillOperation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FillOperation
Source§impl Debug for FillOperation
impl Debug for FillOperation
impl Eq for FillOperation
Source§impl From<FillOperation> for FillOperation
impl From<FillOperation> for FillOperation
Source§fn from(value: FillOperation) -> Self
fn from(value: FillOperation) -> Self
Source§impl Hash for FillOperation
impl Hash for FillOperation
Source§impl Into<FillOperation> for FillOperation
impl Into<FillOperation> for FillOperation
Source§fn into(self) -> FillOperation
fn into(self) -> FillOperation
Source§impl Ord for FillOperation
impl Ord for FillOperation
Source§fn cmp(&self, other: &FillOperation) -> Ordering
fn cmp(&self, other: &FillOperation) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for FillOperation
impl PartialEq for FillOperation
Source§fn eq(&self, other: &FillOperation) -> bool
fn eq(&self, other: &FillOperation) -> bool
self and other values to be equal, and is used by ==.