#[repr(i32)]pub enum FillOperation {
kLINSPACE = 0,
kRANDOM_UNIFORM = 1,
kRANDOM_NORMAL = 2,
}Expand description
FillOperation
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
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 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
Source§fn eq(&self, other: &FillOperation) -> bool
fn eq(&self, other: &FillOperation) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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