yobx.builder.light – Variables#
- class yobx.builder.light._var.BaseVar(parent: OnnxGraph)[source]#
-
- Parameters:
parent – the
OnnxGraphthat owns this variable
- cst(value: ndarray, name: str | None = None) Var[source]#
Adds a constant initializer.
- Parameters:
value – constant numpy array
name – optional name
- Returns:
- make_node(op_type: str, *inputs: Any, domain: str = '', n_outputs: int = 1, output_names: List[str] | None = None, **kwargs: Any) Var | Vars[source]#
Creates a node using inputs and returns the resulting
Var(single output) orVars(multiple outputs).
- v(name: str) Var[source]#
Retrieves a variable by name from the parent graph.
- Parameters:
name – variable name
- Returns:
- class yobx.builder.light.Var(parent: OnnxGraph, name: str, elem_type: int | None = 1, shape: Any | None = None)[source]#
Represents a single ONNX variable (input, constant, node output, or graph output).
- Parameters:
parent – the owning
OnnxGraphname – variable name
elem_type – ONNX element type integer (default:
TensorProto.FLOAT)shape – optional shape tuple