CoreMLConfiguration

Options & Configuration · AiDotNet.Deployment.Mobile.CoreML

Configuration for CoreML model export.

For Beginners

CoreMLConfiguration provides AI safety functionality. Default values follow the original paper settings.

Constructors

Constructor Summary
CoreMLConfiguration()

Properties

Property Summary
CoreMLComputeUnits ComputeUnits { get; set; } Gets or sets the compute units to use (CPU, GPU, Neural Engine).
Dictionary<string, string> InputFeatures { get; set; } Gets or sets input feature names and descriptions.
Dictionary<string, string> OutputFeatures { get; set; } Gets or sets output feature names and descriptions.
bool FlexibleInputShapes { get; set; } Gets or sets whether to enable flexible input shapes (default: false).
bool OptimizeForSize { get; set; } Gets or sets whether to optimize for size (default: true).
bool UseQuantization { get; set; } Gets or sets whether to use quantization (default: true for mobile).
int QuantizationBits { get; set; } Gets or sets the quantization bits (8 or 16, default: 8).
int SpecVersion { get; set; } Gets or sets the CoreML specification version (default: 4).
string MinimumDeploymentTarget { get; set; } Gets or sets the minimum deployment target iOS version.
string ModelAuthor { get; set; } Gets or sets the model author.
string ModelDescription { get; set; } Gets or sets the model description.
string ModelLicense { get; set; } Gets or sets the model license.
string ModelName { get; set; } Gets or sets the model name.

Methods

Method Summary
CoreMLConfiguration ForIPad() Creates a configuration optimized for iPad.
CoreMLConfiguration ForIPhone() Creates a configuration optimized for iPhone.
CoreMLConfiguration ForNeuralEngine() Creates a configuration for Neural Engine optimization.
ExportConfiguration ToExportConfiguration() Converts to ExportConfiguration.