Value
A tensor between two nodes of a graph (or a graph input, output or constant): its name, its slot (spec()), what produces it, and its role flags. Valid while the graph is alive and unchanged; holding a Value keeps the graph alive.
name (property)
The tensor's name.
__init__
__init__(self, /, *args, **kwargs)
Initialize self. See help(type(self)) for accurate signature.
constant
constantconstant(self) -> clika_runtime._core.Tensor
constant(self) -> clika_runtime._core.Tensor
constant() -> Tensor
The bound tensor of a constant value; raises for a value that is not a constant.
is_constant
is_constantis_constant(self) -> bool
is_constant(self) -> bool
is_constant() -> bool
True for a bound constant (a weight, a baked value).
is_graph_input
is_graph_inputis_graph_input(self) -> bool
is_graph_input(self) -> bool
is_graph_input() -> bool
True when a run's input binds here.
is_graph_output
is_graph_outputis_graph_output(self) -> bool
is_graph_output(self) -> bool
is_graph_output() -> bool
True when a run returns this value.
is_state
is_stateis_state(self) -> bool
is_state(self) -> bool
is_state() -> bool
True for a state buffer the graph updates across runs.
producer
producerproducer(self) -> object
producer(self) -> object
producer() -> Node | None
The node computing this value; None for a constant, a state buffer or a graph input.
producer_port
producer_portproducer_port(self) -> int
producer_port(self) -> int
producer_port() -> int
Which output of the producer this value is.
spec
specspec(self) -> clika_runtime._core.TensorSpec
spec(self) -> clika_runtime._core.TensorSpec
spec() -> TensorSpec
The slot: name, dtype and dims (a symbolic dim is -1 and keeps the model's label in dim_names).