Rate this Page

quantize_qat#

classtorch.ao.quantization.quantize_qat(model,run_fn,run_args,inplace=False)[source]#

Do quantization aware training and output a quantized model

Parameters
  • model – input model

  • run_fn – a function for evaluating the prepared model, can be afunction that simply runs the prepared model or a trainingloop

  • run_args – positional arguments forrun_fn

Returns

Quantized model.