Rate this Page

torch.fx.node.map_arg#

torch.fx.node.map_arg(a, fn)[source]#

Apply fn recursively to each Node appearing in arg.

arg may be a list, tuple, slice, or dict with string keys: the return value will have the same type and structure.

Note

Backwards-compatibility for this API is guaranteed.

Return type:

ArgumentT