[−][src]Struct tract_core::plan::SimpleState
Fields
states: Vec<Option<Box<dyn OpState>>>
session_state: SessionState
values: Vec<Option<TVec<Arc<Tensor>>>>
Implementations
impl<F, O, M, P> SimpleState<F, O, M, P> where
F: Fact + Hash + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static + Hash,
M: Borrow<ModelImpl<F, O>> + Hash,
P: Borrow<SimplePlan<F, O, M>> + Clone,
[src]
F: Fact + Hash + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static + Hash,
M: Borrow<ModelImpl<F, O>> + Hash,
P: Borrow<SimplePlan<F, O, M>> + Clone,
pub fn new(plan: P) -> TractResult<SimpleState<F, O, 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<Arc<Tensor>>>
[src]
pub fn run_plan_with_eval<Eval>(
&mut self,
inputs: TVec<Tensor>,
eval: Eval
) -> TractResult<TVec<Arc<Tensor>>> where
Eval: for<'a, 'b, 'c> FnMut(&'a mut SessionState, Option<&'b mut (dyn OpState + 'static)>, &'c BaseNode<F, O>, TVec<Arc<Tensor>>) -> TractResult<TVec<Arc<Tensor>>>,
[src]
&mut self,
inputs: TVec<Tensor>,
eval: Eval
) -> TractResult<TVec<Arc<Tensor>>> where
Eval: for<'a, 'b, 'c> FnMut(&'a mut SessionState, Option<&'b mut (dyn OpState + 'static)>, &'c BaseNode<F, O>, TVec<Arc<Tensor>>) -> TractResult<TVec<Arc<Tensor>>>,
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<Arc<Tensor>>>
[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 prepare_inputs(&self, node: usize) -> TractResult<TVec<Arc<Tensor>>>
[src]
pub fn compute_one(&mut self, node: usize) -> TractResult<()>
[src]
pub fn compute_one_with_inputs(
&mut self,
node: usize,
inputs: TVec<Arc<Tensor>>
) -> TractResult<()>
[src]
&mut self,
node: usize,
inputs: TVec<Arc<Tensor>>
) -> TractResult<()>
pub fn compute_recursively(
&mut self,
node: usize
) -> TractResult<&[Arc<Tensor>]>
[src]
&mut self,
node: usize
) -> TractResult<&[Arc<Tensor>]>
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<F, O, M>
[src]
pub fn model(&self) -> &ModelImpl<F, O>
[src]
Trait Implementations
impl<F: Debug, O: Debug, M: Debug, P: Debug> Debug for SimpleState<F, O, M, P> where
F: Fact + Hash + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static + Hash,
M: Borrow<ModelImpl<F, O>> + Hash,
P: Borrow<SimplePlan<F, O, M>>,
[src]
F: Fact + Hash + Clone + 'static,
O: Debug + Display + AsRef<dyn Op> + AsMut<dyn Op> + Clone + 'static + Hash,
M: Borrow<ModelImpl<F, O>> + Hash,
P: Borrow<SimplePlan<F, O, M>>,
Auto Trait Implementations
impl<F, O, M, P> !RefUnwindSafe for SimpleState<F, O, M, P>
impl<F, O, M, P> Send for SimpleState<F, O, M, P> where
M: Send,
O: Send,
P: Send,
M: Send,
O: Send,
P: Send,
impl<F, O, M, P> !Sync for SimpleState<F, O, M, P>
impl<F, O, M, P> Unpin for SimpleState<F, O, M, P> where
F: Unpin,
M: Unpin,
O: Unpin,
P: Unpin,
F: Unpin,
M: Unpin,
O: Unpin,
P: Unpin,
impl<F, O, M, P> !UnwindSafe for SimpleState<F, O, M, P>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<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> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
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>,