NASOptions<T>

Options & Configuration ยท AiDotNet.Models.Options

Configuration options for Neural Architecture Search (NAS).

Inheritance: ModelOptions โ†’ NASOptions<T>

For Beginners

NAS automatically discovers optimal neural network architectures. Instead of manually designing layers and connections, NAS explores the design space to find architectures that maximize accuracy while meeting hardware constraints.

How It Works

Quick Start Example:

Available Strategies:

  • DARTS: Fast gradient-based search (~1-2 GPU days)
  • GDAS: Improved DARTS with better discretization
  • OnceForAll: Train once, deploy anywhere with elastic networks
  • NeuralArchitectureSearch: Auto-selects best algorithm

Constructors

Constructor Summary
NASOptions()

Properties

Property Summary
Action<int, T> OnEpochComplete { get; set; } Gets or sets the callback invoked after each search epoch.
AutoMLSearchStrategy Strategy { get; set; } Gets or sets the NAS strategy to use.
HardwareConstraints<T> HardwareConstraints { get; set; } Gets or sets the hardware constraints for the architecture search.
HardwarePlatform TargetPlatform { get; set; } Gets or sets the target hardware platform for optimization.
List<double> ElasticWidths { get; set; } Gets or sets the elastic width multipliers for OFA networks.
List<int> ElasticDepths { get; set; } Gets or sets the elastic depth values for OFA networks.
List<int> ElasticExpansionRatios { get; set; } Gets or sets the elastic expansion ratios for OFA inverted residuals.
List<int> ElasticKernelSizes { get; set; } Gets or sets the elastic kernel sizes for OFA networks.
QuantizationMode QuantizationMode { get; set; } Gets or sets the quantization mode for quantization-aware NAS.
SearchSpaceBase<T> SearchSpace { get; set; } Gets or sets the search space configuration.
TimeSpan MaxSearchTime { get; set; } Gets or sets the maximum time for the architecture search.
bool QuantizationAware { get; set; } Gets or sets whether to use quantization-aware training during NAS.
bool SaveCheckpoints { get; set; } Gets or sets whether to save architecture checkpoints during search.
bool Verbose { get; set; } Gets or sets whether to enable verbose logging during search.
double ArchitectureLearningRate { get; set; } Gets or sets the learning rate for architecture parameters.
double MutationProbability { get; set; } Gets or sets the mutation probability for evolutionary search.
double WeightLearningRate { get; set; } Gets or sets the learning rate for network weights.
int Generations { get; set; } Gets or sets the number of generations for evolutionary search.
int InputChannels { get; set; } Gets or sets the number of input channels.
int MaxEpochs { get; set; } Gets or sets the maximum number of search epochs.
int NumClasses { get; set; } Gets or sets the number of output classes.
int PopulationSize { get; set; } Gets or sets the population size for evolutionary search.
int SpatialSize { get; set; } Gets or sets the spatial size of the input (assuming square inputs).
string CheckpointDirectory { get; set; } Gets or sets the checkpoint directory path.

Methods

Method Summary
NASOptions<T> With(Action<NASOptions<T>> configure) Creates a copy of these options with the specified modifications.
void Validate() Validates the options and throws if any are invalid.