pub enum ConstantOp {
Zeros(TensorMeta),
Ones(TensorMeta),
Full(TensorMeta, ScalarValue),
Range(DType, i64, i64, i64),
Eye(DType, usize),
}Expand description
A constant tensor operation.
Variants§
Zeros(TensorMeta)
Zeros tensor.
Ones(TensorMeta)
Ones tensor.
Full(TensorMeta, ScalarValue)
Tensor filled with a value.
Range(DType, i64, i64, i64)
Range/arange tensor.
Eye(DType, usize)
Identity matrix.
Trait Implementations§
Source§impl Clone for ConstantOp
impl Clone for ConstantOp
Source§fn clone(&self) -> ConstantOp
fn clone(&self) -> ConstantOp
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 Debug for ConstantOp
impl Debug for ConstantOp
Source§impl<'de> Deserialize<'de> for ConstantOp
impl<'de> Deserialize<'de> for ConstantOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConstantOp
impl RefUnwindSafe for ConstantOp
impl Send for ConstantOp
impl Sync for ConstantOp
impl Unpin for ConstantOp
impl UnsafeUnpin for ConstantOp
impl UnwindSafe for ConstantOp
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