OpId
PythonOpId = strOpIdattributeAirOperatorSourceclassThe model-file operator an AIR operator was parsed from.AirOperatorclassIntermediate Representation of an operator (node) in the graph.OpId = strThe model-file operator an AIR operator was parsed from.
AirOperatorSource()The model-file operator an AIR operator was parsed from.
Provisional: importable, but outside the compatibility promise; a minor release can change or remove it.
name: str = Field(..., description="The operator's name in the model file")The operator’s name in the model file: a LiteRT builtin
operator name such as LESS, or a custom operator’s canonical key.
op_type: str = Field(..., description='Canonical key of the AIR type the parser gave it')The canonical key of the AIR type the parser gave it, which a transform that rewrites the operator leaves behind.
indices: tuple[int, ...] = Field(..., description="Operator indices in the model file's subgraph")The operator’s index, or the indices a LiteRT model hook states for an operator it created in place of others, in the converted subgraph of the model file; empty for an operator a hook created without stating any.
Intermediate Representation of an operator (node) in the graph.
AirOperator()Intermediate Representation of an operator (node) in the graph.
id: OpId = Field(..., description="Unique node identifier: a decimal integer string from 0 to 2147483647 (e.g. '3')")Unique node identifier: a decimal integer string from 0 to 2147483647 that no other operator in the model has (e.g. ‘3’).
op_type: AirOpType = Field(..., description='The operator unique type.')The operator unique type.
input_ids: list[TensorId] = Field(default_factory=list, description='Input tensor IDs.')Input tensor IDs.
output_ids: list[TensorId] = Field(default_factory=list, description='Output tensor IDs.')Output tensor IDs.
named_tensors: dict[str, TensorId] = Field(default_factory=dict, description='Local tensor names to IDs mapping.')Local tensor names to IDs mapping.
options: AirOperatorOptions = Field(default_factory=AirOperatorOptions, description='Typed options/config for this op.')Typed options/config for this op.
source: AirOperatorSource | None = Field(None, description='The model-file operator it was parsed from; None for one a transform created.')The model-file operator it was
parsed from, which the model loader records; None for an
operator a transform created.
All tensor IDs (inputs + outputs + named tensors) associated with this operator.
tensor_ids: list[TensorId]All tensor IDs (inputs + outputs + named tensors) associated with this operator.
How many input tensors this operator consumes.
fan_in: intHow many input tensors this operator consumes.
How many output tensors this operator produces.
fan_out: intHow many output tensors this operator produces.
Debug print the template values for the operator.
print_info(verbose: int = 0)Debug print the template values for the operator.