Enum TensorDataType
Source#[non_exhaustive]pub enum TensorDataType {
Show 22 variants
Int4,
Int8,
Int16,
Int32,
Int64,
Uint4,
Uint8,
Uint16,
Uint32,
Uint64,
Float16,
Float32,
Float64,
Bfloat16,
String,
Bool,
Complex64,
Complex128,
Float8e4m3fn,
Float8e4m3fnuz,
Float8e5m2,
Float8e5m2fnuz,
}
Expand description
Describe the type of data contain in the tensor.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Int4
signed 4 bit integer tensor data
Int8
signed 8 bit integer tensor data
Int16
signed 16 bit integer tensor data
Int32
signed 32 bit integer tensor data
Int64
signed 64 bit integer tensor data
Uint4
unsigned 4 bit integer tensor data
Uint8
unsigned 8 bit integer tensor data
Uint16
unsigned 16 bit integer tensor data
Uint32
unsigned 32 bit integer tensor data
Uint64
unsigned 64 bit integer tensor data
Float16
16 bit floating point tensor data
Float32
32 bit floating point tensor data
Float64
64 bit floating point tensor data
Bfloat16
“brain” 16 bit floating point tensor data
String
UTF-8 string
Bool
A boolean value stored in 1 byte.
Complex64
A 64-bit complex number stored in 2 32-bit values.
Complex128
A 128-bit complex number stored in 2 64-bit values.
Float8e4m3fn
A non-IEEE 8-bit floating point format with 4 exponent bits and 3 mantissa bits, with NaN and no infinite values (FN). See this paper for more details
Float8e4m3fnuz
A non-IEEE 8-bit floating point format with 4 exponent bits and 3 mantissa bits, with NaN, no infinite values (FN) and no negative zero (UZ). See this paper for more details
Float8e5m2
A non-IEEE 8-bit floating point format with 5 exponent bits and 2 mantissa bits. See this paper for more details
Float8e5m2fnuz
A non-IEEE 8-bit floating point format with 5 exponent bits and 2 mantissa bits, with NaN, no infinite values (FN) and no negative zero (UZ). See this paper for more details
Implementations§
Trait Implementations§
Source§impl Clone for TensorDataType
impl Clone for TensorDataType
Source§fn clone(&self) -> TensorDataType
fn clone(&self) -> TensorDataType
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TensorDataType
impl Debug for TensorDataType
Source§impl Display for TensorDataType
impl Display for TensorDataType
Source§impl Hash for TensorDataType
impl Hash for TensorDataType
Source§impl Ord for TensorDataType
impl Ord for TensorDataType
Source§fn cmp(&self, other: &TensorDataType) -> Ordering
fn cmp(&self, other: &TensorDataType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TensorDataType
impl PartialEq for TensorDataType
Source§impl PartialOrd for TensorDataType
impl PartialOrd for TensorDataType
impl Copy for TensorDataType
impl Eq for TensorDataType
impl StructuralPartialEq for TensorDataType
Auto Trait Implementations§
impl Freeze for TensorDataType
impl RefUnwindSafe for TensorDataType
impl Send for TensorDataType
impl Sync for TensorDataType
impl Unpin for TensorDataType
impl UnwindSafe for TensorDataType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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