neural_compressor.experimental.nas.basic_nas

Basic NAS approach class.

Module Contents

Classes

BasicNAS

Basic NAS approach.

class neural_compressor.experimental.nas.basic_nas.BasicNAS(conf_fname_or_obj, search_space=None, model_builder=None)

Bases: neural_compressor.experimental.nas.nas.NASBase, neural_compressor.experimental.component.Component

Basic NAS approach.

Defining the pipeline for basic NAS approach.

Parameters:
  • conf_fname (string) – The path to the YAML configuration file.

  • search_space (dict) – A dictionary for defining the search space.

  • model_builder (function obj) – A function to build model instance with the specified model architecture parameters.

execute()

Execute the search process.

Returns:

Best model architectures found in the search process.

estimate(model)

Estimate performance of the model.

Depends on specific NAS algorithm. Here we use train and evaluate.

Returns:

Evaluated metrics of the model.

init_by_cfg(conf_fname_or_obj)

Initialize the configuration.

pre_process()

Initialize the train and evaluation settings.