[][src]Struct tract_core::analyser::rules::SharedTensorsProxy

pub struct SharedTensorsProxy {
    pub len: IntProxy,
    // some fields omitted
}

A proxy for a vector of tensors.

This is used for rules concerning the vector of input or output tensors:

solver.equals(inputs.len, 2);

When the indexing operator is used on a SharedTensorsProxy (e.g. inputs[0]), a new SharedTensorProxy is created dynamically and cached in tensors.

The solver should check the coherence of len with the indices of every SharedTensorProxy involved in inference rules, to forbid rules like:

solver.equals(inputs[i].rank, 2);

when i >= len.

Fields

len: IntProxy

Methods

impl SharedTensorsProxy
[src]

pub fn new(path: Path) -> SharedTensorsProxy
[src]

Creates a new SharedTensorsProxy instance.

Trait Implementations

impl Proxy for SharedTensorsProxy
[src]

fn get_path(&self) -> &Path
[src]

Returns the symbolic path to the value.

impl<'a> Proxy for &'a SharedTensorsProxy
[src]

fn get_path(&self) -> &Path
[src]

Returns the symbolic path to the value.

impl Debug for SharedTensorsProxy
[src]

impl Index<usize> for SharedTensorsProxy
[src]

type Output = SharedTensorProxy

The returned type after indexing.

fn index(&self, index: usize) -> &SharedTensorProxy
[src]

Returns the SharedTensorProxy corresponding to the given index.

When an index is used for the first time, the SharedTensorProxy is created dynamically and cached inside self.tensors. This way, future calls to index will return the same SharedTensorProxy.

Auto Trait Implementations

Blanket Implementations

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

impl<T> From for T
[src]

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

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

type Error = !

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

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.

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

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