neural_compressor.experimental.nas.dynast.dynas_search
¶
DyNAS search algorithm class.
Module Contents¶
Classes¶
Manage the search parameters for the DyNAS-T single/multi-objective search. |
|
Interface between the user-defined evaluation interface and the SearchAlgoManager. |
- class neural_compressor.experimental.nas.dynast.dynas_search.SearchAlgoManager(algorithm: str = 'nsga2', seed: int = 0, verbose: bool = False, engine: str = 'pymoo')¶
Manage the search parameters for the DyNAS-T single/multi-objective search.
- Parameters:
algorithm (string) – Define a multi-objective search algorithm.
seed (int) – Seed value for pymoo search.
verbose (Boolean) – Verbosity option.
engine (string) – Support different engine types (e.g. pymoo, optuna, etc.).
- configure_nsga2(population: int = 50, num_evals: int = 1000, warm_pop: numpy.ndarray = None, crossover_prob: float = 0.9, crossover_eta: float = 15.0, mutation_prob: float = 0.02, mutation_eta: float = 20.0) None ¶
Configure the NSGA2 algorithm.
- configure_age(population: int = 50, num_evals: int = 1000, warm_pop: numpy.ndarray = None, crossover_prob: float = 0.9, crossover_eta: float = 15.0, mutation_prob: float = 0.02, mutation_eta: float = 20.0) None ¶
Configure the AGE algorithm.
- run_search(problem: pymoo.core.problem.Problem, save_history=False) pymoo.core.result.Result ¶
Start the search process for the algorithm and problem class that have been previously defined.
- class neural_compressor.experimental.nas.dynast.dynas_search.ProblemMultiObjective(evaluation_interface: neural_compressor.experimental.nas.dynast.dynas_utils.EvaluationInterface, param_count: int, param_upperbound: list)¶
Bases:
pymoo.core.problem.Problem
Interface between the user-defined evaluation interface and the SearchAlgoManager.
- Parameters:
evaluation_interface (Class) – Class that handles the objective measurement call from the supernet.
param_count (int) – Number variables in the search space (e.g., OFA MobileNetV3 has 45).
param_upperbound (array) – The upper int array that defines how many options each design variable has.