Struct tract_core::model::Node
source · pub struct Node<F: Fact + Hash, O: Hash> {
pub id: usize,
pub name: String,
pub inputs: Vec<OutletId>,
pub op: O,
pub outputs: TVec<Outlet<F>>,
}Expand description
A Node in an Model.
Parameterized by a Fact implementation matching the one used in the model.
Fields§
§id: usizenode id in the model
Caution: this id will not be persistent during networks transformation
name: Stringname of the node
This will usually come from the importing framework. tract
transformation try to maintain the names accross transformations.
inputs: Vec<OutletId>A list of incoming tensors, identified by the node outlet that creates them.
op: OThe actual operation the node performs.
outputs: TVec<Outlet<F>>List of ouputs, with their descendant and tensor type information.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<F, O> RefUnwindSafe for Node<F, O>where
F: RefUnwindSafe,
O: RefUnwindSafe,
impl<F, O> Send for Node<F, O>where
O: Send,
impl<F, O> Sync for Node<F, O>where
O: Sync,
impl<F, O> Unpin for Node<F, O>where
F: Unpin,
O: Unpin,
impl<F, O> UnwindSafe for Node<F, O>where
F: UnwindSafe + RefUnwindSafe,
O: UnwindSafe,
Blanket Implementations§
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.