AddExternalInitializers property
\brief Replace initialized Tensors with external data with the data provided in initializers.
The function will find the initialized TensorProtos with external data in the graph with the provided names and replace them with the provided tensors. The API verifies that the TensorProto being replaced has an external data reference and has the same name, dimensions and data type as its replacement. The replacement will occur before any of the optimizations take place. The data will be copied into the graph since TensorProto can't refer to the user provided buffers.
Once the model has been loaded, the OrtValue(s) added to SessionOptions instance will be removed from the internal SessionOptions copy to save memory, the user provided buffers can then be deallocated and the SessionOptions instance that refers to them can be destroyed.
\paramin options
\paramin initializer_names Array of null terminated UTF-8 encoded strings of the initializers names.
\paramin initializers Array of ::OrtValue type
\paramin num_initializers Number of elements in the initializer_names and initializers
\snippet{doc} snippets.dox OrtStatus Return Value
\since Version 1.12.
Implementation
external ffi.Pointer<
ffi.NativeFunction<
OrtStatusPtr Function(
ffi.Pointer<OrtSessionOptions> options,
ffi.Pointer<ffi.Pointer<ffi.Char>> initializer_names,
ffi.Pointer<ffi.Pointer<OrtValue>> initializers,
ffi.Size num_initializers,
)
>
>
AddExternalInitializers;