neural_compressor.experimental.nas.dynast.dynas_predictor
¶
DyNAS Manager class.
Module Contents¶
Classes¶
The Predictor class. |
- class neural_compressor.experimental.nas.dynast.dynas_predictor.Predictor(alphas=DEFAULT_ALPHAS, cost_factors=DEFAULT_COST_FACTORS, max_iterations=DEFAULT_MAX_ITERATIONS, verbose=False)¶
The Predictor class.
It handles the prediction of the metrics like accuracy, MACs and latency etc..
- train(examples, labels)¶
Train the predictor on the specified examples and labels using the underlying regressor.
- Parameters:
examples – Examples to be used for training.
labels – Labels to be used for training.
- predict(examples)¶
Predict the output values of the specified examples using the underlying regressor.
- Parameters:
examples – Examples for which predictions will be made.
- Returns:
Predictions of the specified examples.
- get_parameters()¶
Return the optimal parameter values of the underlying regressor.
- Returns:
Optimal parameter values of the underlying regressor.
- get_metrics(examples, labels)¶
Compute the performance metrics of the underlying regressor.
- Parameters:
examples – Examples to use when computing performance metrics.
labels – Labels to use when computing performance metrics.
- Returns:
- Performance metrics of the underlying regressor. The metrics are
Mean absolute percentage error (MAPE) Root mean squared error (RMSE) Kendall rank correlation coefficient (kendall) Spearman’s rank correlation coefficient (spearman)
- load(filename)¶
Load the model of the underlying regressor and searcher.
- Parameters:
filename – Name of the file from which to load the model.
- save(filename)¶
Save the model of the underlying regressor and searcher.
- Parameters:
filename – Name of the file to which to save the model.