neural_compressor.experimental.common.metric
Common Metric just collects the information to construct a Metric.
Module Contents
Classes
A wrapper of the information needed to construct a Metric. |
- class neural_compressor.experimental.common.metric.Metric(metric_cls, name='user_metric', **kwargs)[source]
A wrapper of the information needed to construct a Metric.
The metric class should take the outputs of the model as the metric’s inputs, neural_compressor built-in metric always take (predictions, labels) as inputs, it’s recommended to design metric_cls to take (predictions, labels) as inputs.