ModelFileInfo
Models & Types · AiDotNet.Helpers
Contains parsed metadata from an AIMF (AI Model File) envelope header.
How It Works
For Beginners: When a model file is saved with the AIMF envelope, the header contains metadata that describes the model without needing to load it fully. This record holds all the information extracted from that header.
Constructors
| Constructor | Summary |
|---|---|
ModelFileInfo(int envelopeVersion, SerializationFormat format, string typeName, string assemblyQualifiedName, int[] inputShape, int[] outputShape, long payloadLength, int headerLength, DynamicShapeInfo dynamicShapeInfo, PayloadEncryptionScheme encryptionScheme, byte[] salt, byte[] nonce, byte[] tag) |
Creates a new ModelFileInfo with the specified header values. |
Properties
| Property | Summary |
|---|---|
DynamicShapeInfo DynamicShapeInfo { get; } |
Gets the dynamic shape information describing which dimensions are variable. |
PayloadEncryptionScheme EncryptionScheme { get; } |
Gets the encryption scheme applied to the payload. |
SerializationFormat Format { get; } |
Gets the serialization format of the model payload. |
bool IsEncrypted { get; } |
Gets whether the payload is encrypted and requires a license key to load. |
byte[] Nonce { get; } |
Gets the AES-GCM nonce (IV) when the payload is encrypted, or null if unencrypted. |
byte[] Salt { get; } |
Gets the PBKDF2 salt used for key derivation when the payload is encrypted, or null if unencrypted. |
byte[] Tag { get; } |
Gets the AES-GCM authentication tag when the payload is encrypted, or null if unencrypted. |
int EnvelopeVersion { get; } |
Gets the envelope format version. |
int HeaderLength { get; } |
Gets the byte offset where the payload starts in the original data. |
int[] InputShape { get; } |
Gets the input shape of the model, or empty array if not available. |
int[] OutputShape { get; } |
Gets the output shape of the model, or empty array if not available. |
long PayloadLength { get; } |
Gets the length of the model payload in bytes. |
string AssemblyQualifiedName { get; } |
Gets the assembly-qualified type name for fallback resolution. |
string TypeName { get; } |
Gets the short type name of the model (e.g., “ConvolutionalNeuralNetwork`1”). |