Struct tract_nnef::internal::TypedFact[][src]

pub struct TypedFact {
    pub datum_type: DatumType,
    pub shape: ShapeFact,
    pub konst: Option<Arc<Tensor>>,
    pub uniform: Option<Arc<Tensor>>,
}

Fully determined tensor information for TypedModel.

Fields

datum_type: DatumType

tensor element type

shape: ShapeFact

tensor shape

konst: Option<Arc<Tensor>>

optional constant value

uniform: Option<Arc<Tensor>>

optional uniform value

Implementations

impl TypedFact[src]

pub fn scalar<T>() -> TypedFact where
    T: Datum
[src]

pub fn shape<T, S>(shape: S) -> TypedFact where
    T: Datum,
    S: Into<ShapeFact>, 
[src]

pub fn dt_scalar(datum_type: DatumType) -> TypedFact[src]

pub fn dt_shape<S>(datum_type: DatumType, shape: S) -> TypedFact where
    S: Into<ShapeFact>, 
[src]

pub fn rank(&self) -> usize[src]

pub fn format_dt_shape(&self) -> String[src]

pub fn consistent(&self) -> Result<(), Error>[src]

pub fn without_value(&self) -> TypedFact[src]

Trait Implementations

impl Clone for TypedFact[src]

impl Debug for TypedFact[src]

impl DynHash for TypedFact[src]

impl Fact for TypedFact[src]

impl<'a> From<&'a TypedFact> for TypedFact[src]

impl<'t> From<&'t Tensor> for TypedFact[src]

impl From<Arc<Tensor>> for TypedFact[src]

impl From<Tensor> for TypedFact[src]

impl Hash for TypedFact[src]

impl PartialEq<TypedFact> for TypedFact[src]

impl SpecialOps<TypedFact, Box<dyn TypedOp + 'static, Global>> for Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>[src]

impl StructuralPartialEq for TypedFact[src]

impl Translate<TypedFact, Box<dyn TypedOp + 'static, Global>, TypedFact, Box<dyn TypedOp + 'static, Global>> for SymbolValues[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.