torch.fx.passes.graph_manipulation.replace_target_nodes_with
-
torch.fx.passes.graph_manipulation.replace_target_nodes_with(fx_module, old_op, old_target, new_op, new_target)[исходный код] -
Изменяет все узлы в fx_module.graph.nodes, соответствующие указанному коду операции и целевому объекту, и обновляет их, чтобы они соответствовали новому коду операции и целевому объекту.
Предупреждение
Этот API является экспериментальным и НЕ совместим с предыдущими версиями.
© 2026, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.14/generated/torch.fx.passes.graph_manipulation.replace_target_nodes_with.html