3.7. unit_scaling.transforms.utils

Utilities for working with transforms.

Functions

apply_transform(module, backend[, ...])

Applies a graph transformation to a module.

patch_to_expand_modules(fn)

By default TorchDynamo doesn't recurse into torch.nn modules or torch.nn.functional functions when capturing the FX graph.

replace_node_with_function(graph, source, ...)

Given a source node and its accompanying graph, remove the node and replace it with a new node that represents calling the target function.

torch_nn_modules_to_user_modules(mod)

Convert torch.nn.module classes to trivial_subclass versions.