pub enum TensorData {
Int64(Vec<i64>),
Int32(Vec<i32>),
Float32(Vec<f32>),
Float64(Vec<f64>),
UInt8(Vec<u8>),
Int8(Vec<i8>),
}Expand description
Represents constant tensor data with various types
Variants§
Implementations§
Source§impl TensorData
impl TensorData
Sourcepub fn data_type(&self) -> TensorProto_DataType
pub fn data_type(&self) -> TensorProto_DataType
Get the data type
Sourcepub fn from_tensor_proto(tensor: &TensorProto) -> Result<Self, OnnxError>
pub fn from_tensor_proto(tensor: &TensorProto) -> Result<Self, OnnxError>
Create from TensorProto
Trait Implementations§
Source§impl Clone for TensorData
impl Clone for TensorData
Source§fn clone(&self) -> TensorData
fn clone(&self) -> TensorData
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 moreAuto Trait Implementations§
impl Freeze for TensorData
impl RefUnwindSafe for TensorData
impl Send for TensorData
impl Sync for TensorData
impl Unpin for TensorData
impl UnsafeUnpin for TensorData
impl UnwindSafe for TensorData
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