pub enum TensorDType {
F32,
F16,
F64,
I8,
I16,
I32,
I64,
U8,
U16,
U32,
U64,
Bool,
}Expand description
Canonical scalar dtype advertised by a model input or output.
Mirrors a pragmatic subset of the ONNX dtype list. Internally
oxionnx stores tensor data as f32, so anything non-F32 signals
a cast at the boundary (performed inside the pipeline layer).
Variants§
F32
32-bit IEEE float.
F16
16-bit IEEE float.
F64
64-bit IEEE float.
I8
Signed 8-bit integer.
I16
Signed 16-bit integer.
I32
Signed 32-bit integer.
I64
Signed 64-bit integer.
U8
Unsigned 8-bit integer.
U16
Unsigned 16-bit integer.
U32
Unsigned 32-bit integer.
U64
Unsigned 64-bit integer.
Bool
Boolean.
Implementations§
Trait Implementations§
Source§impl Clone for TensorDType
impl Clone for TensorDType
Source§fn clone(&self) -> TensorDType
fn clone(&self) -> TensorDType
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 moreimpl Copy for TensorDType
Source§impl Debug for TensorDType
impl Debug for TensorDType
impl Eq for TensorDType
Source§impl Hash for TensorDType
impl Hash for TensorDType
Source§impl PartialEq for TensorDType
impl PartialEq for TensorDType
Source§fn eq(&self, other: &TensorDType) -> bool
fn eq(&self, other: &TensorDType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TensorDType
Auto Trait Implementations§
impl Freeze for TensorDType
impl RefUnwindSafe for TensorDType
impl Send for TensorDType
impl Sync for TensorDType
impl Unpin for TensorDType
impl UnsafeUnpin for TensorDType
impl UnwindSafe for TensorDType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more