boundlab.expr.MakeTuple#
- class boundlab.expr.MakeTuple[source]#
Bases:
TupleExprExpression representing the construction of a tuple from multiple sub-expressions.
This is used to combine multiple expressions into a single TupleExpr, such as the outputs of a multi-output operation. Like GetTupleItem, this is an implementation detail for handling multi-output operations and is not intended for direct use by users.
- children#
A tuple of sub-expressions that are combined into this TupleExpr.
Methods
Perform backward-mode bound propagation through this expression.
Convert this expression to a string for debugging purposes.
Return a new TupleExpr with the same flags but new children.
- property shape: tuple[torch.Size, ...]#
- property children: tuple[Expr, ...]#
Children expressions that contribute to this TupleExpr. This is used for topological sorting and weight propagation.
- backward(*weights, direction='==')[source]#
Perform backward-mode bound propagation through this expression.
- with_children(*new_children)[source]#
Return a new TupleExpr with the same flags but new children. This is used for expression rewriting during bound propagation.
- to_string(*children_str, indent=0)#
Convert this expression to a string for debugging purposes. The children_str arguments are the string representations of the children expressions, in the same order as self.children.