ExportConfiguration

Options & Configuration · AiDotNet.Deployment.Export

Configuration options for model export operations.

For Beginners

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

Constructors

Constructor Summary
ExportConfiguration()

Properties

Property Summary
Dictionary<string, object> PlatformSpecificOptions { get; set; } Gets or sets additional platform-specific options.
Dictionary<string, string> CustomOperatorMappings { get; set; } Gets or sets custom operator mappings for unsupported operations.
QuantizationMode QuantizationMode { get; set; } Gets or sets the quantization mode for the exported model.
TargetPlatform TargetPlatform { get; set; } Gets or sets the target hardware platform for optimization.
bool IncludeMetadata { get; set; } Gets or sets whether to include metadata in the exported model (default: true).
bool OptimizeModel { get; set; } Gets or sets whether to optimize the exported model (default: true).
bool UseDynamicShapes { get; set; } Gets or sets whether to use dynamic input shapes (default: false).
bool ValidateAfterExport { get; set; } Gets or sets whether to perform model validation after export (default: true).
int BatchSize { get; set; } Gets or sets the batch size for static shapes (default: 1).
int OpsetVersion { get; set; } Gets or sets the target ONNX opset version (default: 13).
int[] InputShape { get; set; } Gets or sets the input shape dimensions (excluding batch dimension).
int[] OutputShape { get; set; } Gets or sets the output shape dimensions (excluding batch dimension).
string ModelDescription { get; set; } Gets or sets the model description to include in metadata.
string ModelName { get; set; } Gets or sets the model name to include in metadata.
string ModelVersion { get; set; } Gets or sets the model version to include in metadata.

Methods

Method Summary
ExportConfiguration ForEdge() Creates a default configuration for edge devices.
ExportConfiguration ForMobile(QuantizationMode quantization) Creates a default configuration for mobile export.
ExportConfiguration ForTensorRT(int batchSize, bool useFp16) Creates a default configuration for TensorRT export.