[][src]Struct tract_core::plan::SimpleState

pub struct SimpleState<M: Borrow<Model>, P: Borrow<SimplePlan<M>>> {
    pub states: Vec<Option<Box<dyn OpState>>>,
    pub values: Vec<Option<TVec<SharedTensor>>>,
    // some fields omitted
}

Fields

states: Vec<Option<Box<dyn OpState>>>values: Vec<Option<TVec<SharedTensor>>>

Methods

impl<M: Borrow<Model>, P: Borrow<SimplePlan<M>>> SimpleState<M, P>
[src]

pub fn new(plan: P) -> TractResult<SimpleState<M, P>>
[src]

pub fn reset_wires(&mut self) -> TractResult<()>
[src]

Reset wires state.

pub fn reset_op_states(&mut self) -> TractResult<()>
[src]

Reset wires state.

pub fn run(&mut self, inputs: TVec<Tensor>) -> TractResult<TVec<SharedTensor>>
[src]

pub fn set_inputs(&mut self, inputs: TVec<Tensor>) -> TractResult<()>
[src]

pub fn set_input(&mut self, input: usize, t: Tensor) -> TractResult<()>
[src]

pub fn take_outputs(&mut self) -> TractResult<Vec<SharedTensor>>
[src]

pub fn set_values(&mut self, id: usize, values: TVec<Tensor>) -> TractResult<()>
[src]

pub fn set_value(&mut self, id: usize, value: Tensor) -> TractResult<()>
[src]

pub fn compute_one(&mut self, node: usize) -> TractResult<()>
[src]

pub fn compute_recursively(&mut self, node: usize) -> TractResult<()>
[src]

pub fn take_by_name(&mut self, name: &str) -> TractResult<TVec<Tensor>>
[src]

pub fn take(&mut self, id: usize) -> TractResult<TVec<Tensor>>
[src]

pub fn plan(&self) -> &SimplePlan<M>
[src]

pub fn model(&self) -> &Model
[src]

Trait Implementations

impl<M: Borrow<Model>, P: Borrow<SimplePlan<M>> + Clone> Clone for SimpleState<M, P>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<M: Debug + Borrow<Model>, P: Debug + Borrow<SimplePlan<M>>> Debug for SimpleState<M, P>
[src]

Auto Trait Implementations

impl<M, P> Send for SimpleState<M, P> where
    M: Send,
    P: Send

impl<M, P> !Sync for SimpleState<M, P>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

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]

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