get_fqn_to_example_inputs
- class torch.ao.quantization.utils.get_fqn_to_example_inputs(model, example_inputs)
Given a model and its example inputs, return a dictionary from fully qualified name of submodules to example_inputs for that submodule, e.g.
{"linear1": (tensor1,), "linear2": (tensor2,), "sub": (tensor3,), "sub.linear1": (tensor4,), ...}Used to make quantizing submodules easier now that FX Graph Mode Quantization requires example inputs.