Class OrtExternalInitializerInfo
Class to that stores information about the file location where an "external" initializer is stored.
Inherited Members
Namespace: Microsoft.ML.OnnxRuntime
Assembly: Microsoft.ML.OnnxRuntime.dll
Syntax
public class OrtExternalInitializerInfo : SafeHandle, IDisposable, IReadOnlyExternalInitializerInfo
Constructors
| Improve this Doc View SourceOrtExternalInitializerInfo(string, long, long)
Create a new OrtExternalInitializerInfo instance.
Declaration
public OrtExternalInitializerInfo(string filePath, long fileOffset, long byteSize)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filePath | The path to the file that stores the initializer data. |
| long | fileOffset | The byte offset in the file where the data is stored. |
| long | byteSize | The size of the data (in bytes) within the file. |
Properties
| Improve this Doc View SourceIsInvalid
Indicates whether the native handle is invalid.
Declaration
public override bool IsInvalid { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Methods
| Improve this Doc View SourceGetByteSize()
Get the size in bytes of the initializer's data within the file.
Declaration
public long GetByteSize()
Returns
| Type | Description |
|---|---|
| long | The size in bytes of the initializer data. |
GetFileOffset()
Get the byte offset within the file where the initializer's data is stored.
Declaration
public long GetFileOffset()
Returns
| Type | Description |
|---|---|
| long | The file offset location. |
GetFilePath()
Get the file path to the file that store's the initializer's data.
Declaration
public string GetFilePath()
Returns
| Type | Description |
|---|---|
| string | The file path. |
Remarks
The path is relative to the filesystem directory where the ONNX model was stored.
ReleaseHandle()
Release the native instance of OrtExternalInitializerInfo if we own it.
Declaration
protected override bool ReleaseHandle()
Returns
| Type | Description |
|---|---|
| bool | true on success and false on error. |