[−][src]Struct tract_core::analyser::types::TensorFact
Partial information about a tensor.
The task of the analyser is to tag every edge in the graph with information about the tensors that flow through it - specifically their datum_type, their shape and possibly their value. During the analysis, however, we might only know some of that information (say, for instance, that an edge only carries tensors of rank 4, but without knowing their precise dimension).
This is where tensor facts come in: they hold partial information about the datum_type, shape and value of tensors that might flow through an edge of the graph. The analyser will first tag each edge with a fact, starting with the most general one and specializing it at each iteration. Eventually, it will reach a fixed point that - hopefully - holds enough information.
Fields
datum_type: TypeFact
shape: ShapeFact
value: ValueFact
Methods
impl TensorFact
[src]
pub fn new() -> TensorFact
[src]
Constructs the most general tensor fact possible.
pub fn any() -> TensorFact
[src]
pub fn dt(dt: DatumType) -> TensorFact
[src]
pub fn dt_shape<S: Into<ShapeFact>>(dt: DatumType, shape: S) -> TensorFact
[src]
pub fn shape<S: Into<ShapeFact>>(shape: S) -> TensorFact
[src]
pub fn with_datum_type(self, dt: DatumType) -> TensorFact
[src]
pub fn with_shape<S: Into<ShapeFact>>(self, shape: S) -> TensorFact
[src]
pub fn with_streaming_shape<S: IntoIterator<Item = Option<usize>>>(
self,
shape: S
) -> TensorFact
[src]
self,
shape: S
) -> TensorFact
pub fn stream_info(&self) -> TractResult<Option<StreamInfo>>
[src]
pub fn format_dt_shape(&self) -> String
[src]
Trait Implementations
impl Fact for TensorFact
[src]
type Concrete = Arc<Tensor>
fn concretize(&self) -> Option<Self::Concrete>
[src]
Tries to transform the fact into a concrete value.
fn unify(&self, other: &Self) -> TractResult<Self>
[src]
Tries to unify the fact with another fact of the same type.
fn is_concrete(&self) -> bool
[src]
Returns whether the value is fully determined.
impl TensorInfo for TensorFact
[src]
fn to_tensor_fact(&self) -> TensorFact
[src]
impl PartialEq<TensorFact> for TensorFact
[src]
fn eq(&self, other: &TensorFact) -> bool
[src]
fn ne(&self, other: &TensorFact) -> bool
[src]
impl Default for TensorFact
[src]
fn default() -> TensorFact
[src]
impl Clone for TensorFact
[src]
fn clone(&self) -> TensorFact
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<V: Into<Arc<Tensor>>> From<V> for TensorFact
[src]
fn from(v: V) -> TensorFact
[src]
impl Debug for TensorFact
[src]
impl<'a> TryFrom<&'a TensorFact> for TypedTensorInfo
[src]
type Error = TractError
The type returned in the event of a conversion error.
fn try_from(fact: &TensorFact) -> TractResult<TypedTensorInfo>
[src]
impl TryFrom<TensorFact> for TypedTensorInfo
[src]
type Error = TractError
The type returned in the event of a conversion error.
fn try_from(fact: TensorFact) -> TractResult<TypedTensorInfo>
[src]
Auto Trait Implementations
impl Send for TensorFact
impl Sync for TensorFact
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> Clone for T where
T: Clone,
[src]
T: Clone,