ailia
1.4.0.0
|
Classes | |
class | AILIAEnvironment |
struct | ailiaFileCallback |
class | AILIAShape |
Public Member Functions | |
delegate IntPtr | ailiaCallbackOpen (IntPtr args) |
delegate Int32 | ailiaCallbackSeek (IntPtr fp, Int64 offset) |
delegate Int64 | ailiaCallbackTell (IntPtr fp) |
delegate Int64 | ailiaCallbackSize (IntPtr fp) |
delegate Int32 | ailiaCallbackRead (IntPtr dest, Int64 size, IntPtr fp) |
delegate Int32 | ailiaCallbackClose (IntPtr fp) |
static int | ailiaCreate (ref IntPtr net, int env_id, int num_thread) |
Create a network object. More... | |
static int | ailiaOpenStreamFile (IntPtr net, string path) |
Initialize network object. (read from file) More... | |
static int | ailiaOpenWeightFile (IntPtr net, string path) |
Load weight coefficients into network object. More... | |
static int | ailiaOpenStreamEx (IntPtr net, IntPtr fopen_args, ailiaFileCallback callback, Int32 version) |
Initialize network object. (user-defined file access callback) More... | |
static int | ailiaOpenWeightEx (IntPtr net, IntPtr fopen_args, ailiaFileCallback callback, Int32 version) |
Load weight coefficients into network object. (user-defined file access callback) More... | |
static int | ailiaOpenStreamMem (IntPtr net, byte[] buf, UInt32 buf_size) |
Initialize network object. (read from memory) More... | |
static int | ailiaOpenWeightMem (IntPtr net, byte[] buf, UInt32 buf_size) |
Load weight coefficients into network object. (read from memory) More... | |
static void | ailiaDestroy (IntPtr net) |
destroy network object * More... | |
static int | ailiaSetInputShape (IntPtr net, [In] AILIAShape shape, UInt32 version) |
Change the shape of input data during inference. More... | |
static int | ailiaSetInputShapeND (IntPtr net, UInt32[] shape, UInt32 dim) |
Change the shape of input data during inference. More... | |
static int | ailiaGetInputShape (IntPtr net, [In, Out] AILIAShape shape, UInt32 version) |
Get the shape of the input data during inference. More... | |
static int | ailiaGetInputDim (IntPtr net, ref UInt32 dim) |
Get the dimension of the input data during inference. More... | |
static int | ailiaGetInputShapeND (IntPtr net, UInt32[] shape, UInt32 dim) |
Get the shape of the input data during inference. More... | |
static int | ailiaGetOutputShape (IntPtr net, [In, Out] AILIAShape shape, UInt32 version) |
Get the shape of the output data during inference and training. More... | |
static int | ailiaGetOutputDim (IntPtr net, ref UInt32 dim) |
Get the dimension of the output data during inference. More... | |
static int | ailiaGetOutputShapeND (IntPtr net, UInt32[] shape, UInt32 dim) |
Get the shape of the output data during inference. More... | |
static int | ailiaPredict (IntPtr net, IntPtr dest, UInt32 dest_size, IntPtr src, UInt32 src_size) |
Infer and get the result of inference. More... | |
static int | ailiaGetBlobCount (IntPtr net, ref UInt32 blob_count) |
Get the number of internal data (Blob) at inference. More... | |
static int | ailiaGetBlobShape (IntPtr net, [In, Out] AILIAShape shape, UInt32 blob_idx, UInt32 version) |
Get the shape of the internal data (Blob) at the time of inference. More... | |
static int | ailiaGetBlobDim (IntPtr net, ref UInt32 dim, UInt32 blob_idx) |
Get the dimension of the internal data (Blob) at the time of inference. More... | |
static int | ailiaGetBlobShapeND (IntPtr net, UInt32[] shape, UInt32 dim, UInt32 blob_idx) |
Get the shape of the internal data (Blob) at the time of inference. More... | |
static int | ailiaGetBlobData (IntPtr net, IntPtr dest, UInt32 dest_size, UInt32 blob_idx) |
Get internal data (Blob) at inference time. More... | |
static int | ailiaFindBlobIndexByName (IntPtr net, ref UInt32 blob_idx, string name) |
Find and get the index of the internal data (Blob) at inference time by name. More... | |
static int | ailiaGetBlobNameLengthByIndex (IntPtr net, UInt32 blob_idx, ref UInt32 buffer_size) |
Output the required buffer size for the name of the internal data (Blob). More... | |
static int | ailiaFindBlobNameByIndex (IntPtr net, IntPtr buffer, UInt32 buffer_size, UInt32 blob_idx) |
static int | ailiaGetSummaryLength (IntPtr net, ref UInt32 buffer_size) |
Output the required buffer size for network Summary. More... | |
static int | ailiaSummary (IntPtr net, byte[] buffer, UInt32 buffer_size) |
Display the name and shape of each Blob. More... | |
static int | ailiaGetInputBlobCount (IntPtr net, ref UInt32 input_blob_count) |
Get the number of input data (Blob). More... | |
static int | ailiaGetBlobIndexByInputIndex (IntPtr net, ref UInt32 blob_idx, UInt32 input_blob_idx) |
Get the index of the input data (Blob) More... | |
static int | ailiaSetInputBlobData (IntPtr net, IntPtr src, UInt32 src_size, UInt32 blob_idx) |
Give input data to the specified Blob. More... | |
static int | ailiaSetInputBlobShape (IntPtr net, [In] AILIAShape shape, UInt32 blob_idx, UInt32 version) |
Change the shape of the specified Blob. More... | |
static int | ailiaSetInputBlobShapeND (IntPtr net, UInt32[] shape, UInt32 dim, UInt32 blob_idx) |
Change the shape of the specified Blob. More... | |
static int | ailiaCopyBlobData (IntPtr dst_net, UInt32 dst_blob_idx, IntPtr src_net, UInt32 src_blob_idx) |
Perform copies between blobs that specified. More... | |
static int | ailiaUpdate (IntPtr net) |
Perform inference with pre-specified input data. More... | |
static int | ailiaGetOutputBlobCount (IntPtr net, ref UInt32 output_blob_count) |
Get the number of output data (Blob). More... | |
static int | ailiaGetBlobIndexByOutputIndex (IntPtr net, ref UInt32 blob_idx, UInt32 output_blob_idx) |
get index of output data (Blob) More... | |
static int | ailiaSetTemporaryCachePath (string path) |
Specify temporary cache directory. More... | |
static int | ailiaGetEnvironmentCount (ref Int32 env_count) |
Get the number of available computing environments (CPU, GPU) More... | |
static int | ailiaGetEnvironment (ref IntPtr env, UInt32 env_idx, UInt32 version) |
static int | ailiaGetSelectedEnvironment (IntPtr net, ref IntPtr env, UInt32 version) |
Get the selected computing environment. More... | |
static int | ailiaSetMemoryMode (IntPtr net, UInt32 mode) |
Sets the memory usage policy during inference. More... | |
static int | ailiaDisableLayerFusion (IntPtr net) |
Disables layer integration during inference. More... | |
static int | ailiaSetProfileMode (IntPtr net, UInt32 mode) |
Set profile mode. More... | |
static IntPtr | ailiaGetStatusString (Int32 status) |
Returns a string describing the status code. More... | |
static IntPtr | ailiaGetErrorDetail (IntPtr net) |
Returns error details. More... | |
static IntPtr | ailiaGetVersion () |
Get the library version. More... | |
static int | ailiaFinalize () |
Release GPU and other resources that have been globally allocated with ailia. More... | |
delegate Int32 ailia.Ailia.ailiaCallbackClose | ( | IntPtr | fp | ) |
delegate IntPtr ailia.Ailia.ailiaCallbackOpen | ( | IntPtr | args | ) |
delegate Int32 ailia.Ailia.ailiaCallbackRead | ( | IntPtr | dest, |
Int64 | size, | ||
IntPtr | fp | ||
) |
delegate Int32 ailia.Ailia.ailiaCallbackSeek | ( | IntPtr | fp, |
Int64 | offset | ||
) |
delegate Int64 ailia.Ailia.ailiaCallbackSize | ( | IntPtr | fp | ) |
delegate Int64 ailia.Ailia.ailiaCallbackTell | ( | IntPtr | fp | ) |
static int ailia.Ailia.ailiaCopyBlobData | ( | IntPtr | dst_net, |
UInt32 | dst_blob_idx, | ||
IntPtr | src_net, | ||
UInt32 | src_blob_idx | ||
) |
Perform copies between blobs that specified.
dst_net | The network object pointer that contains destination blob |
dst_blob_idx | The index of destination blob |
src_net | The network object pointer that contains source blob |
src_blob_idx | The index of source blob |
Perform copy blobs between specified network. It accepts copy over different network. The src_blob_index must be specify blob index that inputs of src_net, and the dst_blob_index mut be specify blob index that outputs of dst_net. If specify index of other blob for dst_blob_idx , this function returns AILIA_STATUS_INVALID_ARGUMENT .
static int ailia.Ailia.ailiaCreate | ( | ref IntPtr | net, |
int | env_id, | ||
int | num_thread | ||
) |
Create a network object.
net | Pointer to network object pointer |
env_id | ID of the environment to use for calculation (obtained with ailiaGetEnvironment()) AILIA_ENVIRONMENT_ID_AUTO If set to AILIA_ENVIRONMENT_ID_AUTO, it is automatically selected |
num_thread | Number of threads, automatic if AILIA_MULTITHREAD_AUTO |
static void ailia.Ailia.ailiaDestroy | ( | IntPtr | net | ) |
destroy network object *
net | network object pointer |
net | Network object pointer |
static int ailia.Ailia.ailiaDisableLayerFusion | ( | IntPtr | net | ) |
Disables layer integration during inference.
net | Network object pointer |
This is used when it is necessary to retrieve a Blob that can no longer be retrieved due to layer integration, etc. * Must be specified immediately after ailiaCreate(). Must be specified immediately after ailiaCreate(); it cannot be changed after a call to ailiaOpen. Note that disabling layer integration may reduce inference speed.
static int ailia.Ailia.ailiaFinalize | ( | ) |
Release GPU and other resources that have been globally allocated with ailia.
It must be called with all ailia instances created by ailiaCreate() released by ailiaDestroy(). Otherwise, #ref AILIA_STATUS_INVALID_STATE will be returned.
static int ailia.Ailia.ailiaFindBlobIndexByName | ( | IntPtr | net, |
ref UInt32 | blob_idx, | ||
string | name | ||
) |
Find and get the index of the internal data (Blob) at inference time by name.
net | Network object pointer |
blob_idx | Index of blob (0~ ailiaGetBlobCount() -1) |
name | Blob name to search |
static int ailia.Ailia.ailiaFindBlobNameByIndex | ( | IntPtr | net, |
IntPtr | buffer, | ||
UInt32 | buffer_size, | ||
UInt32 | blob_idx | ||
) |
static int ailia.Ailia.ailiaGetBlobCount | ( | IntPtr | net, |
ref UInt32 | blob_count | ||
) |
Get the number of internal data (Blob) at inference.
net | Network object pointer |
blob_count | Where to store the number of blobs |
static int ailia.Ailia.ailiaGetBlobData | ( | IntPtr | net, |
IntPtr | dest, | ||
UInt32 | dest_size, | ||
UInt32 | blob_idx | ||
) |
Get internal data (Blob) at inference time.
net | Network object pointer |
dest | Buffer to which inference result is written out Stored in numeric type in the order of X,Y,Z,W |
dest_size | Number of bytes in the buffer to which inference results are written |
blob_idx | Index of blob (0 to ailiaGetBlobCount() -1) |
If ailiaPredict() has never been executed, then AILIA_STATUS_INVALID_STATE is returned.
static int ailia.Ailia.ailiaGetBlobDim | ( | IntPtr | net, |
ref UInt32 | dim, | ||
UInt32 | blob_idx | ||
) |
Get the dimension of the internal data (Blob) at the time of inference.
net | Network object pointer |
dim | Where blob's dimension is stored |
blob_idx | Index of blob (0~ ailiaGetBlobCount() -1) |
static int ailia.Ailia.ailiaGetBlobIndexByInputIndex | ( | IntPtr | net, |
ref UInt32 | blob_idx, | ||
UInt32 | input_blob_idx | ||
) |
Get the index of the input data (Blob)
net | Network object pointer |
blob_idx | Index in blob (0~ ailiaGetBlobCount() -1) |
input_blob_idx | Index in input blob (0~ ailiaGetInputBlobCount() -1) |
input_blob_idx |
static int ailia.Ailia.ailiaGetBlobIndexByOutputIndex | ( | IntPtr | net, |
ref UInt32 | blob_idx, | ||
UInt32 | output_blob_idx | ||
) |
get index of output data (Blob)
net | Network object pointer |
blob_idx | Index in blob (0~ ailiaGetBlobCount() -1) |
output_blob_idx | Index in output blob (0~ ailiaGetOutputBlobCount() -1) |
static int ailia.Ailia.ailiaGetBlobNameLengthByIndex | ( | IntPtr | net, |
UInt32 | blob_idx, | ||
ref UInt32 | buffer_size | ||
) |
Output the required buffer size for the name of the internal data (Blob).
net | Network object pointer |
blob_idx | Index of blob (0~ ailiaGetBlobCount() -1) |
buffer_size | Buffer size required to output Blob name (including terminating null character) |
static int ailia.Ailia.ailiaGetBlobShape | ( | IntPtr | net, |
[In, Out] AILIAShape | shape, | ||
UInt32 | blob_idx, | ||
UInt32 | version | ||
) |
Get the shape of the internal data (Blob) at the time of inference.
net | Network object pointer |
shape | Shape information of input data |
blob_idx | Index of blob (0~ ailiaGetBlobCount() -1) |
version | AILIA_SHAPE_VERSION |
static int ailia.Ailia.ailiaGetBlobShapeND | ( | IntPtr | net, |
UInt32[] | shape, | ||
UInt32 | dim, | ||
UInt32 | blob_idx | ||
) |
Get the shape of the internal data (Blob) at the time of inference.
net | Network object pointer |
shape | Array to store the size of each dimension of the blob (stored in dim-1, dim-2, ... ,1, 0 in that order) |
dim | Dimension of shape |
blob_idx | Index of the blob (0 to ailiaGetBlobCount() -1) |
static int ailia.Ailia.ailiaGetEnvironment | ( | ref IntPtr | env, |
UInt32 | env_idx, | ||
UInt32 | version | ||
) |
static int ailia.Ailia.ailiaGetEnvironmentCount | ( | ref Int32 | env_count | ) |
Get the number of available computing environments (CPU, GPU)
env_count | Where to store the number of environment information |
static IntPtr ailia.Ailia.ailiaGetErrorDetail | ( | IntPtr | net | ) |
Returns error details.
net | Network object pointer |
The return value does not need to be released. The string is valid until the next call to ailia's API. Convert from the point obtained to a string as follows
static int ailia.Ailia.ailiaGetInputBlobCount | ( | IntPtr | net, |
ref UInt32 | input_blob_count | ||
) |
Get the number of input data (Blob).
net | Network object pointer |
input_blob_count | Where to store the number of input blobs |
static int ailia.Ailia.ailiaGetInputDim | ( | IntPtr | net, |
ref UInt32 | dim | ||
) |
Get the dimension of the input data during inference.
net | Network object pointer |
dim | Where dimension of input data is stored |
static int ailia.Ailia.ailiaGetInputShape | ( | IntPtr | net, |
[In, Out] AILIAShape | shape, | ||
UInt32 | version | ||
) |
Get the shape of the input data during inference.
net | Network object pointer |
shape | Shape information of input data |
Use ailiaGetInputDim() or ailiaGetInputShapeND() if the shape has more than 5 dimensions. If a part of the shape is undefined, the value of the corresponding dimension is set to 0, and the values of the other dimensions are stored as valid values.
static int ailia.Ailia.ailiaGetInputShapeND | ( | IntPtr | net, |
UInt32[] | shape, | ||
UInt32 | dim | ||
) |
Get the shape of the input data during inference.
net | Network object pointer |
shape | Array to store the size of each dimension of the input data (stored in dim-1, dim-2, ... ,1, 0 in that order) |
dim | Dimension of shape |
If a part of the shape is not yet determined, the value of the corresponding dimension is set to 0, and valid values are stored for the other dimensions.
static int ailia.Ailia.ailiaGetOutputBlobCount | ( | IntPtr | net, |
ref UInt32 | output_blob_count | ||
) |
Get the number of output data (Blob).
net | Network object pointer |
output_blob_count | Where to store the number of output blobs |
static int ailia.Ailia.ailiaGetOutputDim | ( | IntPtr | net, |
ref UInt32 | dim | ||
) |
Get the dimension of the output data during inference.
net | Network object pointer |
dim | Where dimension of output data is stored |
static int ailia.Ailia.ailiaGetOutputShape | ( | IntPtr | net, |
[In, Out] AILIAShape | shape, | ||
UInt32 | version | ||
) |
Get the shape of the output data during inference and training.
net | Network object pointer |
shape | Shape information of output data |
Use ailiaGetOutputDim() and ailiaGetOutputShapeND() if the shape has more than 5 dimensions.
static int ailia.Ailia.ailiaGetOutputShapeND | ( | IntPtr | net, |
UInt32[] | shape, | ||
UInt32 | dim | ||
) |
Get the shape of the output data during inference.
net | Network object pointer |
shape | Array to store the size of each dimension of output data (stored in dim-1, dim-2, ... ,1, 0 in that order) |
dim | Dimension of shape |
static int ailia.Ailia.ailiaGetSelectedEnvironment | ( | IntPtr | net, |
ref IntPtr | env, | ||
UInt32 | version | ||
) |
Get the selected computing environment.
net | Network object pointer |
env | Where computation environment information is stored (valid until AILIANetwork instance is destroyed) |
version | AILIA_ENVIRONMENT_VERSION |
static IntPtr ailia.Ailia.ailiaGetStatusString | ( | Int32 | status | ) |
Returns a string describing the status code.
status | Status code |
The return value does not need to be released. The string is valid until the ailia library is unloaded. Convert from the point obtained to a string as follows
static int ailia.Ailia.ailiaGetSummaryLength | ( | IntPtr | net, |
ref UInt32 | buffer_size | ||
) |
Output the required buffer size for network Summary.
net | Network object pointer |
buffer_size | Where buffer size is stored (including terminating null character) |
static IntPtr ailia.Ailia.ailiaGetVersion | ( | ) |
Get the library version.
The return value does not need to be released.
static int ailia.Ailia.ailiaOpenStreamEx | ( | IntPtr | net, |
IntPtr | fopen_args, | ||
ailiaFileCallback | callback, | ||
Int32 | version | ||
) |
Initialize network object. (user-defined file access callback)
net | Network object pointer |
fopen_args | Argument pointer notified to AILIA_USER_API_FOPEN |
callback | User-defined file access callback structure |
version | Version of the file access callback structure (AILIA_FILE_CALLBACK_VERSION ) |
Read from file and initialize network object.
static int ailia.Ailia.ailiaOpenStreamFile | ( | IntPtr | net, |
string | path | ||
) |
Initialize network object. (read from file)
net | Network object pointer |
path | Pathname of prototxt file (MBSC or UTF16) |
Initialize the network object by reading from the file.
static int ailia.Ailia.ailiaOpenStreamMem | ( | IntPtr | net, |
byte[] | buf, | ||
UInt32 | buf_size | ||
) |
Initialize network object. (read from memory)
net | Network object pointer |
buf | Pointer to data in prototxt file |
buf_size | Data size of prototxt file |
Read from memory and initialize the network object.
static int ailia.Ailia.ailiaOpenWeightEx | ( | IntPtr | net, |
IntPtr | fopen_args, | ||
ailiaFileCallback | callback, | ||
Int32 | version | ||
) |
Load weight coefficients into network object. (user-defined file access callback)
net | Network object pointer |
fopen_args | Argument pointer notified to AILIA_USER_API_FOPEN |
callback | User-defined file access callback structure |
version | Version of the file access callback structure (AILIA_FILE_CALLBACK_VERSION ) |
Load weights from a file into a network object.
static int ailia.Ailia.ailiaOpenWeightFile | ( | IntPtr | net, |
string | path | ||
) |
Load weight coefficients into network object.
net | Network object pointer |
path | Pathname of protobuf/onnx file (MBSC or UTF16) |
Load weights from the file into the read network object.
static int ailia.Ailia.ailiaOpenWeightMem | ( | IntPtr | net, |
byte[] | buf, | ||
UInt32 | buf_size | ||
) |
Load weight coefficients into network object. (read from memory)
net | Network object pointer |
buf | Pointer to data in protobuf/onnxf file |
buf_size | Data size of protobuf/onnxf file |
Load weights from the file into the network object.
static int ailia.Ailia.ailiaPredict | ( | IntPtr | net, |
IntPtr | dest, | ||
UInt32 | dest_size, | ||
IntPtr | src, | ||
UInt32 | src_size | ||
) |
Infer and get the result of inference.
net | Network object pointer |
dest | Buffer to which inference result is written, stored in numeric type in the order of X,Y,Z,W Size is outputSize of net file |
dest_size | Number of bytes in the buffer to which inference results are written |
src | Inference data X,Y,Z,W stored in order by numeric type Size is inputSize of net file |
src_size | Number of bytes of inference data |
static int ailia.Ailia.ailiaSetInputBlobData | ( | IntPtr | net, |
IntPtr | src, | ||
UInt32 | src_size, | ||
UInt32 | blob_idx | ||
) |
Give input data to the specified Blob.
net | Network object pointer |
src | Inference data X,Y,Z,W stored in order by numeric type Size is inputSize of net file |
src_size | Inference data size |
blob_idx | Index of input blob |
This is used to specify an input in a network with multiple inputs, etc. * blob_idx is the index of the input blob. If blob_idx is specified other than blob of input layer AILIA_STATUS_INVALID_ARGUMENT} is returned.
static int ailia.Ailia.ailiaSetInputBlobShape | ( | IntPtr | net, |
[In] AILIAShape | shape, | ||
UInt32 | blob_idx, | ||
UInt32 | version | ||
) |
Change the shape of the specified Blob.
net | Network object pointer |
shape | Shape information of input data |
blob_idx | Index of blob to be changed |
version | AILIA_SHAPE_VERSION |
This is used to change the input shape in networks with multiple inputs, etc. If blob_idx is specified other than blob of input layer AILIA_STATUS_INVALID_ARGUMENT} is returned. See the description of ailiaSetInputShape() for other notes. If the input shape has a rank of 5 or more dimensions, use ailiaSetInputBlobShapeND().
static int ailia.Ailia.ailiaSetInputBlobShapeND | ( | IntPtr | net, |
UInt32[] | shape, | ||
UInt32 | dim, | ||
UInt32 | blob_idx | ||
) |
Change the shape of the specified Blob.
net | Network object pointer |
shape | Array of sizes of each dimension of input data (dim-1, dim-2, ... ,1, 0) |
dim | dim Dimension of shape |
blob_idx | Index of blob to be changed |
This is used to change the input shape in a network with multiple inputs, etc. If blob_idx is specified other than blob of input layer AILIA_STATUS_INVALID_ARGUMENT} is returned. See the description of ailiaSetInputShapeND() for other notes.
static int ailia.Ailia.ailiaSetInputShape | ( | IntPtr | net, |
[In] AILIAShape | shape, | ||
UInt32 | version | ||
) |
Change the shape of input data during inference.
net | Network object pointer |
shape | Shape information of input data |
version | AILIA_SHAPE_VERSION |
Change the input shape defined in prototxt. Must be the same as the rank described in prototxt. Note that an error code may be returned if the shape of the weight coefficients depends on the input shape. If the rank defined in prototxt is more than 5 dimensions, use ailiaSetInputShapeND().
static int ailia.Ailia.ailiaSetInputShapeND | ( | IntPtr | net, |
UInt32[] | shape, | ||
UInt32 | dim | ||
) |
Change the shape of input data during inference.
net | Network object pointer |
shape | Array of sizes of each dimension of input data (dim-1, dim-2, ... ,1, 0) |
dim | Dimension of shape |
Change the input shape defined in prototxt. Must be the same as the rank described in prototxt. Note that an error may be returned due to the shape of the weight coefficients being dependent on the input shape, etc.
static int ailia.Ailia.ailiaSetMemoryMode | ( | IntPtr | net, |
UInt32 | mode | ||
) |
Sets the memory usage policy during inference.
net | network object pointer |
mode | Memory mode (multiple specifiable by logical OR) AILIA_MEMORY_XXX (default: AILIA_MEMORY_REDUCE_CONSTANT ) |
Change the memory usage policy. If you specify anything other than AILIA_MEMORY_NO_OPTIMIZATION The amount of memory used during inference can be reduced because the intermediate buffer allocated during inference is released. It must be specified immediately after ailiaCreate(); it cannot be changed after a call to ailiaOpen. Note that if you specify that intermediate buffers are to be released, calling ailiaGetBlobData() for the corresponding Blob will return AILIA_STATUS_DATA_HIDDEN error will be returned.
static int ailia.Ailia.ailiaSetProfileMode | ( | IntPtr | net, |
UInt32 | mode | ||
) |
Set profile mode.
net | network object pointer |
mode | profile mode |
Specifies the profile mode. Default is disabled. Call it after calling ailiaOpenStreamXXX. If profile mode is enabled, the profile result is added to the output of ailiaSummary().
static int ailia.Ailia.ailiaSetTemporaryCachePath | ( | string | path | ) |
Specify temporary cache directory.
cache_dir | temporary cache directory |
The specified cache directory is used by the system to generate and store machine code optimized for each inference execution environment. Only one call should be made at the start of ailia execution. For the second and subsequent calls, ignore them and return success. No particular problem occurs when called by multiple threads because of the internal exclusion control. Some functions, such as Vulkan's shader cache function, cannot be used until this API is called. Specify the file path obtained by Context.getCacheDir() for cache_dir.
static int ailia.Ailia.ailiaSummary | ( | IntPtr | net, |
byte[] | buffer, | ||
UInt32 | buffer_size | ||
) |
Display the name and shape of each Blob.
net | Network object pointer |
buffer | Output destination of summary |
buffer_size | Size of output buffer (including terminating null characters). Set the value obtained with ailiaGetSummaryLength(). |
static int ailia.Ailia.ailiaUpdate | ( | IntPtr | net | ) |
Perform inference with pre-specified input data.
net | Network object pointer |
This is used when input is given using ailiaSetInputBlobData(), etc. Get the inference result with ailiaGetBlobData().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Indicates that it works with FP16.
|
static |
Indicates the use of a power-saving GPU (e.g., built-in GPU) (for MPS).
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Intermediate buffers are not opened.
|
static |
|
static |
Open intermediate buffers that are constants for weights, etc.
|
static |
Infer with memory mapped file for weight due to reduce ram usage.
When need to convert weight, it will allocate temporary buffer and after infer, release buffer. It will apply when load from file, and environment that mmap available. It will create temporary file due to speedup mmap, so you should be call ailiaSetTemporaryCachePath. If do not call ailiaSetTemporaryCachePath and specify this, it will return error AILIA_STATUS_INVALID_STATE
when call ailiaOpenWeightXXX. AILIA_MEMORY_REDUCE_INTERSTAGE and AILIA_MEMORY_REUSE_INTERSTAGE can be used together.
|
static |
The input designation initializer is made unchangeable, and intermediate buffers that are constants for weights, etc., are released.
|
static |
Open intermediate buffers during inference.
|
static |
Share intermediate buffers to infer. When used with AILIA_MEMORY_REDUCE_INTERSTAGE, the shareable intermediate buffer is not released.
|
static |
|
static |
|
static |
|
static |
|
static |
Incorrect stream version or structure version
|
static |
It was information that could not be retrieved from the application.
|
static |
Removed by optimization, etc.
|
static |
File access failed.
|
static |
Model expiration
|
static |
Error during processing on GPU
|
static |
Given a layer parameter not yet supported by the GPU
|
static |
Invalid argument
|
static |
Incorrect layer weights, input shapes, etc.
|
static |
Invalid parameter file content
|
static |
Internal state of decoder is incorrect
|
static |
|
static |
License is broken.
|
static |
License expiration
|
static |
Cannot find a valid license
|
static |
Insufficient memory
|
static |
Indicates that the shape is more than 5 dimensional
|
static |
The specified element could not be found.
|
static |
Unknown error
|
static |
Unauthorized operations
|
static |
Success
|
static |
Failed to create thread.
|
static |
uninstalled
|
static |
Shape not yet determined
|
static |
Unsupported Networks
|
static |