Enum tensorflow::DataType

source ·
pub enum DataType {
Show 24 variants UnrecognizedEnumValue(c_uint), Float, Double, Int32, UInt8, Int16, Int8, String, Complex64, Int64, Bool, QInt8, QUInt8, QInt32, BFloat16, QInt16, QUInt16, UInt16, Complex128, Half, Resource, Variant, UInt32, UInt64,
}
Expand description

Type of a single tensor element.

Variants§

§

UnrecognizedEnumValue(c_uint)

Represents an unrecognized value.

This allows such values to come from the C API and be sent back to the C API without loss in case new values are added in the future.

§

Float

32-bit floating point.

§

Double

64-bit floating point.

§

Int32

32-bit signed integer.

§

UInt8

8-bit unsigned integer.

§

Int16

16-bit signed integer.

§

Int8

8-bit signed integer.

§

String

String.

§

Complex64

Complex number composed of two 32-bit floats.

§

Int64

64-bit signed integer.

§

Bool

Boolean.

§

QInt8

Quantized 8-bit signed integer.

§

QUInt8

Quantized 8-bit unsigned integer.

§

QInt32

Quantized 32-bit signed integer.

§

BFloat16

Float32 truncated to 16 bits. Only for cast ops. Note that this is not the same as Half. BFloat16 is not an IEEE-754 16-bit float. See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/framework/bfloat16.h for details.

§

QInt16

Quantized 16-bit signed integer.

§

QUInt16

Quantized 16-bit unsigned integer.

§

UInt16

16-bit unsigned integer.

§

Complex128

Complex number composed of two 64-bit floats.

§

Half

16-bit floating point.

§

Resource

TensorFlow Resource (name, container, device,…)

§

Variant

A dynamic type similar to std::any::Any.

§

UInt32

32-bit unsigned integer.

§

UInt64

64-bit unsigned integer.

Trait Implementations§

source§

impl Clone for DataType

source§

fn clone(&self) -> DataType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DataType

source§

fn default() -> DataType

Returns the “default value” for a type. Read more
source§

impl Display for DataType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Ord for DataType

source§

fn cmp(&self, other: &DataType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<DataType> for DataType

source§

fn eq(&self, other: &DataType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<DataType> for DataType

source§

fn partial_cmp(&self, other: &DataType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for DataType

source§

impl Eq for DataType

source§

impl StructuralEq for DataType

source§

impl StructuralPartialEq for DataType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.