[−][src]Enum tensorflow_proto::xla::PrimitiveType
Primitive types are the individual values that can be held in rectangular multidimensional arrays. A description of the rectangular multidimensional array dimensions / primitive type is given by Shape, below.
Variants
Invalid primitive type to serve as default.
Predicates are two-state booleans.
Signed integral values of fixed width.
Unsigned integral values of fixed width.
Floating-point values of fixed width.
Note: if f16s are not natively supported on the device, they will be converted to f16 from f32 at arbirary points in the computation.
Truncated 16 bit floating-point format. This is similar to IEEE's 16 bit floating-point format, but uses 1 bit for the sign, 8 bits for the exponent and 7 bits for the mantissa.
Complex values of fixed width.
Paired F32 (real, imag), as in std::complex
Paired F64 (real, imag), as in std::complex
A tuple is a polymorphic sequence; e.g. a shape that holds different sub-shapes. They are used for things like returning multiple values from a computation; e.g. a computation that returns weights and biases may have a signature that results in a tuple like (f32[784x2000], f32[2000])
If a shape proto has the tuple element type, it may not have any entries in the dimensions field.
An opaque type used for passing context-specific data to a custom operation. Shapes of this primitive type will have empty dimensions and tuple_shapes fields.
(OPAQUE would be a better name for this identifier, but that conflicts with a macro defined in windows.h.)
A token type threaded between side-effecting operations. Shapes of this primitive type will have empty dimensions and tuple_shapes fields.
Implementations
impl PrimitiveType
[src]
pub fn is_valid(value: i32) -> bool
[src]
Returns true
if value
is a variant of PrimitiveType
.
pub fn from_i32(value: i32) -> Option<PrimitiveType>
[src]
Converts an i32
to a PrimitiveType
, or None
if value
is not a valid variant.
Trait Implementations
impl Clone for PrimitiveType
[src]
fn clone(&self) -> PrimitiveType
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PrimitiveType
[src]
impl Debug for PrimitiveType
[src]
impl Default for PrimitiveType
[src]
fn default() -> PrimitiveType
[src]
impl Eq for PrimitiveType
[src]
impl From<PrimitiveType> for i32
[src]
fn from(value: PrimitiveType) -> i32
[src]
impl Hash for PrimitiveType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for PrimitiveType
[src]
fn cmp(&self, other: &PrimitiveType) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<PrimitiveType> for PrimitiveType
[src]
fn eq(&self, other: &PrimitiveType) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<PrimitiveType> for PrimitiveType
[src]
fn partial_cmp(&self, other: &PrimitiveType) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for PrimitiveType
[src]
impl StructuralPartialEq for PrimitiveType
[src]
Auto Trait Implementations
impl RefUnwindSafe for PrimitiveType
impl Send for PrimitiveType
impl Sync for PrimitiveType
impl Unpin for PrimitiveType
impl UnwindSafe for PrimitiveType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,