Struct tract_pulse::internal::Node
pub struct Node<F, O>where
F: Fact,{
pub id: usize,
pub name: String,
pub inputs: Vec<OutletId>,
pub op: O,
pub outputs: SmallVec<[Outlet<F>; 4]>,
}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: SmallVec<[Outlet<F>; 4]>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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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.