pub struct GraphNode<T: TensorElement> {
pub id: NodeId,
pub op: GraphOp,
pub inputs: Vec<NodeId>,
pub data: Option<Arc<Tensor<T>>>,
pub shape: Option<Vec<usize>>,
pub device: DeviceType,
}Expand description
Node in the computation graph
Fields§
§id: NodeIdUnique node ID
op: GraphOpOperation type
inputs: Vec<NodeId>Input node IDs
data: Option<Arc<Tensor<T>>>Cached tensor data (for constants)
shape: Option<Vec<usize>>Output shape (if known)
device: DeviceTypeDevice
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for GraphNode<T>
impl<T> RefUnwindSafe for GraphNode<T>where
T: RefUnwindSafe,
impl<T> Send for GraphNode<T>
impl<T> Sync for GraphNode<T>
impl<T> Unpin for GraphNode<T>
impl<T> UnsafeUnpin for GraphNode<T>
impl<T> UnwindSafe for GraphNode<T>where
T: RefUnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more