Struct tract_hir::internal::Node [−][src]
pub struct Node<F, O> where
F: Fact + Hash,
O: Hash, {
pub id: usize,
pub name: String,
pub inputs: Vec<OutletId, Global>,
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: usize
node id in the model
Caution: this id will not be persistent during networks transformation
name: String
name of the node
This will usually come from the importing framework. tract
transformation try to maintain the names accross transformations.
inputs: Vec<OutletId, Global>
A list of incoming tensors, identified by the node outlet that creates them.
op: O
The actual operation the node performs.
outputs: SmallVec<[Outlet<F>; 4]>
List of ouputs, with their descendant and tensor type information.
Implementations
Try to downcast the node operation to O.
Trait Implementations
Auto Trait Implementations
impl<F, O> RefUnwindSafe for Node<F, O> where
F: RefUnwindSafe,
O: RefUnwindSafe,
impl<F, O> UnwindSafe for Node<F, O> where
F: UnwindSafe + RefUnwindSafe,
O: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘimpl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘimpl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;
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
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more