[][src]Struct tract_core::analyser::types::TensorFact

pub struct TensorFact {
    pub datum_type: TypeFact,
    pub shape: ShapeFact,
    pub value: ValueFact,
}

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

Methods

impl TensorFact
[src]

Constructs the most general tensor fact possible.

Trait Implementations

impl Fact for TensorFact
[src]

Tries to transform the fact into a concrete value.

Tries to unify the fact with another fact of the same type.

Returns whether the value is fully determined.

impl Default for TensorFact
[src]

Returns the "default value" for a type. Read more

impl PartialEq<TensorFact> for TensorFact
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Into<Tensor>> From<T> for TensorFact
[src]

Performs the conversion.

impl Clone for TensorFact
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for TensorFact
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for TensorFact

impl Sync for TensorFact

Blanket Implementations

impl<PB, Tract> ToTract for PB where
    Tract: Tractify<PB>, 
[src]

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

Performs the conversion.

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

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

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

impl<T> Downcast for T where
    T: Any
[src]

Convert Box<Trait> (where Trait: Downcast) to Box<Any>. Box<Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any's vtable from &Trait's. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any's vtable from &mut Trait's. Read more