neural_compressor.strategy.mse

MSE tuning strategy.

Module Contents

Classes

MSETuneStrategy

The tuning strategy using MSE policy in tuning space.

class neural_compressor.strategy.mse.MSETuneStrategy(model, conf, q_dataloader=None, q_func=None, eval_func=None, eval_dataloader=None, eval_metric=None, resume=None, q_hooks=None)[source]

The tuning strategy using MSE policy in tuning space.

The MSE strategy needs to get the tensors for each OP of raw FP32 models and the quantized model based on the best model-wise tuning configuration. It then calculates the MSE (Mean Squared Error) for each OP, sorts those OPs according to the MSE value, and performs the op-wise fallback in this order.