Rate this Page

maybe_get_next_module#

class torch.ao.quantization.fx.utils.maybe_get_next_module(node, modules, target_module_type=None, target_functional_type=None)[source]#

Gets the next module that matches what is needed in is_target_module_type if it exists

Parameters:
  • node (Node) – The node whose users we want to look at

  • target_module_type (type[Module] | None) – Module type that we want to check

  • target_functional_type (Any | None) – Functional type that we want to check

Return type:

Node | None