[−][src]Struct tract_core::model::Model
Model is Tract workhouse.
Methods
impl Model[src]
impl Modelpub fn with_context(self, ctx: Arc<dyn Context>) -> Model | [src] |
pub fn add_node(&mut self, name: String, op: Box<dyn Op>) -> TractResult<usize> | [src] |
pub fn clear_inputs(&mut self, node: usize) -> TractResult<()> | [src] |
pub fn add_edge(&mut self, outlet: OutletId, inlet: InletId) -> TractResult<()> | [src] |
pub fn set_inputs( | [src] |
pub fn set_outputs( | [src] |
pub fn set_outputs_outlets(&mut self, outputs: &[OutletId]) -> TractResult<()> | [src] |
pub fn set_fact( | [src] |
pub fn set_input_fact( | [src] |
pub fn facts( | [src] |
pub fn analyse_one(&mut self, id: usize) -> TractResult<()> | [src] |
pub fn analyse(&mut self) -> TractResult<()> | [src] |
pub fn missing_type_shape(&self) -> TractResult<Vec<OutletId>> | [src] |
pub fn into_optimized(self) -> TractResult<Model> | [src] |
pub fn eval_order(&self) -> TractResult<Vec<usize>> | [src] |
pub fn node_by_name(&self, name: &str) -> TractResult<&Node> | [src] |
pub fn node_names(&self) -> Vec<&str> | [src] |
pub fn node(&self, id: usize) -> &Node | [src] |
pub fn node_mut(&mut self, id: usize) -> &mut Node | [src] |
pub fn nodes(&self) -> &[Node] | [src] |
pub fn mut_nodes(&mut self) -> &mut [Node] | [src] |
pub fn fact(&self, outlet: OutletId) -> TractResult<&TensorFact> | [src] |
pub fn inputs_fact(&self, ix: usize) -> TractResult<&TensorFact> | [src] |
pub fn input_fact(&self) -> TractResult<&TensorFact> | [src] |
pub fn inputs(&self) -> TractResult<&[OutletId]> | [src] |
pub fn outputs_fact(&self, ix: usize) -> TractResult<&TensorFact> | [src] |
pub fn output_fact(&self) -> TractResult<&TensorFact> | [src] |
pub fn outputs(&self) -> TractResult<&[OutletId]> | [src] |
pub fn into_arc(self) -> Arc<Model> | [src] |
pub fn check_edges(&self) -> TractResult<()> | [src] |
Trait Implementations
impl ModelDsl for Model[src]
impl ModelDsl for Modelfn add_source<S: AsRef<str>>(&mut self, name: S) -> TractResult<usize> | [src] |
fn add_source_fact<S: AsRef<str>>( | [src] |
fn add_const<S: AsRef<str>>( | [src] |
fn chain<S: AsRef<str>>( | [src] |
fn single_prec(&self, id: usize) -> TractResult<Option<&Node>> | [src] |
fn single_prec_at(&self, id: usize, count: usize) -> TractResult<Option<&Node>> | [src] |
fn single_succ_at(&self, id: usize, count: usize) -> TractResult<Option<&Node>> | [src] |
fn single_succ(&self, id: usize) -> TractResult<Option<&Node>> | [src] |
fn tap_and_chain<S: AsRef<str>>( | [src] |
fn replace_nodes( | [src] |
fn unlink_node(&mut self, node: usize) -> TractResult<()> | [src] |
impl Default for Model[src]
impl Default for Modelimpl Clone for Model[src]
impl Clone for Modelfn clone(&self) -> Model | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source. Read more
impl Debug for Model[src]
impl Debug for ModelAuto Trait Implementations
Blanket Implementations
impl<PB, Tract> ToTract for PB where
Tract: Tractify<PB>, [src]
impl<PB, Tract> ToTract for PB where
Tract: Tractify<PB>, fn tractify(&Self) -> Result<Tract, TractError> | [src] |
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
🔬 This is a nightly-only experimental API. (
try_from)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> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, 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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId | [src] |
impl<T> Downcast for T where
T: Any, [src]
impl<T> Downcast for T where
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]
impl<T> Clone for T where
T: Clone,