#[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].
kRANDOM_UNIFORM = 1
! Randomly draw values from a uniform distribution.
kRANDOM_NORMAL = 2
! Randomly draw values from a normal distribution.
Trait Implementations§
Source§impl Clone for FillOperation
impl Clone for FillOperation
Source§fn clone(&self) -> FillOperation
fn clone(&self) -> FillOperation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ExternType for FillOperation
impl ExternType for FillOperation
Source§impl Hash for FillOperation
impl Hash for FillOperation
Source§impl PartialEq for FillOperation
impl PartialEq for FillOperation
impl Eq for FillOperation
impl StructuralPartialEq for FillOperation
impl UniquePtrTarget for FillOperation
impl VectorElement for FillOperation
impl WeakPtrTarget for FillOperation
Auto Trait Implementations§
impl Freeze for FillOperation
impl RefUnwindSafe for FillOperation
impl Send for FillOperation
impl Sync for FillOperation
impl Unpin for FillOperation
impl UnwindSafe for FillOperation
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