Class NasAutoMLModelBase<T>
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
TThe numeric type used for calculations.
- Inheritance
-
NasAutoMLModelBase<T>
- Implements
- Derived
- Inherited Members
-
AutoMLModelBase<T, Tensor<T>, Tensor<T>>.SetModelEvaluator(IModelEvaluator<T, Tensor<T>, Tensor<T>>)
- 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
NasSearchSpace
Gets the NAS search space.
protected abstract SearchSpaceBase<T> NasSearchSpace { get; }
Property Value
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
modelSuperNet<T>architectureArchitecture<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
modelTypeModelTypeparametersDictionary<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
modelTypeModelType
Returns
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
inputsTensor<T>targetsTensor<T>validationInputsTensor<T>validationTargetsTensor<T>timeLimitTimeSpancancellationTokenCancellationToken
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
inputsTensor<T>targetsTensor<T>validationInputsTensor<T>validationTargetsTensor<T>timeLimitTimeSpancancellationTokenCancellationToken
Returns
- Task<IFullModel<T, Tensor<T>, Tensor<T>>>
SuggestNextTrialAsync()
Suggests the next trial parameters.
public override Task<Dictionary<string, object>> SuggestNextTrialAsync()