torch.ao.ns._numeric_suite
Warning:
This module is an early prototype and is subject to change.
torch.ao.ns._numeric_suite.compare_weights(float_dict, quantized_dict)
Compare the weights of the float module with its corresponding
   quantized module. Return a dict with key corresponding to module
   names and each entry being a dictionary with two keys 'float' and
   'quantized', containing the float and quantized weights. This dict
   can be used to compare and compute the quantization error of the
   weights of float and quantized models.
Example usage:
  wt_compare_dict = compare_weights(
      float_model.state_dict(), qmodel.state_dict())
  for key in wt_compare_dict:
      print(
          key,
          compute_error(
              wt_compare_dict[key]['float'],
              wt_compare_dict[key]['quantized'].dequantize()
          )
      )

Parameters: