pub struct Value {
pub id: ValueId,
pub name: Option<String>,
pub dtype: DataType,
pub shape: Shape,
pub layout: TensorLayout,
pub device: Option<DeviceId>,
pub producer: Option<NodeId>,
pub consumers: Vec<NodeId>,
}Expand description
A value flowing through the graph — the output of one node and the input of zero or more others (SSA form: at most one producer).
Carries a first-class TensorLayout and optional DeviceId placement,
beyond ONNX’s plain type+shape.
Fields§
§id: ValueId§name: Option<String>Optional name (graph inputs/outputs and initializers are named; interior SSA values may be anonymous).
dtype: DataType§shape: Shape§layout: TensorLayout§device: Option<DeviceId>Device placement, filled in by the placement pass.
producer: Option<NodeId>The node that produces this value, or None for graph inputs and
initializers.
consumers: Vec<NodeId>Nodes that consume this value (one entry per consuming input slot).
Implementations§
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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