AiModelResultOnnxExtensions

Helpers & Utilities · AiDotNet.Onnx

Public-facing ONNX export API on AiModelResult. These are the methods user code calls; everything in src/Onnx/ below this surface is implementation detail.

Usage:

v0.1 supports sequential models composed of: DenseLayer, ActivationLayer (ReLU/Sigmoid/Tanh/Softmax/Identity), BatchNormalizationLayer, DropoutLayer. Other layer types throw OnnxExportUnsupportedException with the unsupported layer’s type name.

Methods

Method Summary
bool CanExportToOnnx(AiModelResult<T, TInput, TOutput> result) Returns true if every layer in the model has an ONNX converter today.
void ExportToOnnx(AiModelResult<T, TInput, TOutput> result, Stream stream, OnnxExportOptions options) Exports to a stream — useful for uploading directly to cloud storage.
void ExportToOnnx(AiModelResult<T, TInput, TOutput> result, string filePath, OnnxExportOptions options) Exports to a stream — useful for uploading directly to cloud storage.