Table of Contents

Class NasAutoMLModelBase<T>

Namespace
AiDotNet.AutoML.NAS
Assembly
AiDotNet.dll

Base class for NAS-based AutoML models.

public abstract class NasAutoMLModelBase<T> : AutoMLModelBase<T, Tensor<T>, Tensor<T>>, IAutoMLModel<T, Tensor<T>, Tensor<T>>, IFullModel<T, Tensor<T>, Tensor<T>>, IModel<Tensor<T>, Tensor<T>, ModelMetadata<T>>, IModelSerializer, ICheckpointableModel, IParameterizable<T, Tensor<T>, Tensor<T>>, IFeatureAware, IFeatureImportance<T>, ICloneable<IFullModel<T, Tensor<T>, Tensor<T>>>, IGradientComputable<T, Tensor<T>, Tensor<T>>, IJitCompilable<T>

Type Parameters

T

The numeric type used for calculations.

Inheritance
AutoMLModelBase<T, Tensor<T>, Tensor<T>>
NasAutoMLModelBase<T>
Implements
IAutoMLModel<T, Tensor<T>, Tensor<T>>
IFullModel<T, Tensor<T>, Tensor<T>>
IModel<Tensor<T>, Tensor<T>, ModelMetadata<T>>
IParameterizable<T, Tensor<T>, Tensor<T>>
ICloneable<IFullModel<T, Tensor<T>, Tensor<T>>>
IGradientComputable<T, Tensor<T>, Tensor<T>>
Derived
Inherited Members
Extension Methods

Properties

BestArchitecture

Gets the best architecture found by the NAS search.

public Architecture<T>? BestArchitecture { get; protected set; }

Property Value

Architecture<T>

NasNumNodes

Gets the number of nodes to search over.

protected abstract int NasNumNodes { get; }

Property Value

int

NasSearchSpace

Gets the NAS search space.

protected abstract SearchSpaceBase<T> NasSearchSpace { get; }

Property Value

SearchSpaceBase<T>

NumOps

Gets the numeric operations provider for T.

protected abstract INumericOperations<T> NumOps { get; }

Property Value

INumericOperations<T>

Methods

ApplyArchitectureToModel(SuperNet<T>, Architecture<T>)

protected virtual void ApplyArchitectureToModel(SuperNet<T> model, Architecture<T> architecture)

Parameters

model SuperNet<T>
architecture Architecture<T>

CreateModelAsync(ModelType, Dictionary<string, object>)

Creates a model instance for the given type and parameters

protected override Task<IFullModel<T, Tensor<T>, Tensor<T>>> CreateModelAsync(ModelType modelType, Dictionary<string, object> parameters)

Parameters

modelType ModelType
parameters Dictionary<string, object>

Returns

Task<IFullModel<T, Tensor<T>, Tensor<T>>>

GetDefaultSearchSpace(ModelType)

Gets the default search space for a model type

protected override Dictionary<string, ParameterRange> GetDefaultSearchSpace(ModelType modelType)

Parameters

modelType ModelType

Returns

Dictionary<string, ParameterRange>

SearchArchitecture(Tensor<T>, Tensor<T>, Tensor<T>, Tensor<T>, TimeSpan, CancellationToken)

Performs algorithm-specific architecture search.

protected abstract Architecture<T> SearchArchitecture(Tensor<T> inputs, Tensor<T> targets, Tensor<T> validationInputs, Tensor<T> validationTargets, TimeSpan timeLimit, CancellationToken cancellationToken)

Parameters

inputs Tensor<T>
targets Tensor<T>
validationInputs Tensor<T>
validationTargets Tensor<T>
timeLimit TimeSpan
cancellationToken CancellationToken

Returns

Architecture<T>

SearchAsync(Tensor<T>, Tensor<T>, Tensor<T>, Tensor<T>, TimeSpan, CancellationToken)

Runs the NAS search and returns the best model found.

public override Task<IFullModel<T, Tensor<T>, Tensor<T>>> SearchAsync(Tensor<T> inputs, Tensor<T> targets, Tensor<T> validationInputs, Tensor<T> validationTargets, TimeSpan timeLimit, CancellationToken cancellationToken = default)

Parameters

inputs Tensor<T>
targets Tensor<T>
validationInputs Tensor<T>
validationTargets Tensor<T>
timeLimit TimeSpan
cancellationToken CancellationToken

Returns

Task<IFullModel<T, Tensor<T>, Tensor<T>>>

SuggestNextTrialAsync()

Suggests the next trial parameters.

public override Task<Dictionary<string, object>> SuggestNextTrialAsync()

Returns

Task<Dictionary<string, object>>