Bolt
|
Public Member Functions | |
BoltModel (String modelPath, AffinityType affinity, int inputNum, String[] inputName, int[] inputN, int[] inputC, int[] inputH, int[] inputW, DataType[] inputDataType, DataFormat[] inputDataFormat) | |
initial model and alloc memory More... | |
BoltModel (String modelPath, AffinityType affinity, int inputNum, String[] inputName, int[] inputN, int[] inputC, int[] inputH, int[] inputW, DataType[] inputDataType, DataFormat[] inputDataFormat, int outputNum, String[] outputName) | |
initial model and alloc memory, and the output is decided by user More... | |
void | setRuntimeDevice (int cpuId, DeviceType device) throws FileNotFoundException |
set process to run on specified CPU core More... | |
void | setRuntimeDeviceDynamic () throws FileNotFoundException |
set process cpu affinity according cpu average occupy More... | |
native void | setNumThreads (int threads) |
set parallel threads num More... | |
BoltResult | run (int inputNum, String[] inputName, float[][] inputData) |
inference result from input More... | |
BoltResult | run (int inputNum, String[] inputName, int[] inputN, int[] inputC, int[] inputH, int[] inputW, DataType[] inputDataType, DataFormat[] inputDataFormat, float[][] inputData) |
inference result from resized input More... | |
void | destructor () |
recycle memory and destroy model More... | |
Protected Member Functions | |
Object | clone () |
clone BoltModel More... | |
Definition at line 26 of file BoltModel.java.
com.huawei.noah.BoltModel.BoltModel | ( | String | modelPath, |
AffinityType | affinity, | ||
int | inputNum, | ||
String [] | inputName, | ||
int [] | inputN, | ||
int [] | inputC, | ||
int [] | inputH, | ||
int [] | inputW, | ||
DataType [] | inputDataType, | ||
DataFormat [] | inputDataFormat | ||
) |
initial model and alloc memory
modelPath | model file path of String type |
affinity | CPU affinity setting of AffinityType(enum) type |
inputNum | the number of input data of int type |
inputName | the array of all input data's name of string type |
inputN | the array of all input data's n dimension of int type |
inputC | the array of all input data's c dimension of int type |
inputH | the array of all input data's h dimension of int type |
inputW | the array of all input data's w dimension of int type |
inputDataType | the array of all input data's data type of DataType(enum) type |
inputDataFormat | the array of all input data's data format of DataFormat(enum) type |
Definition at line 63 of file BoltModel.java.
com.huawei.noah.BoltModel.BoltModel | ( | String | modelPath, |
AffinityType | affinity, | ||
int | inputNum, | ||
String [] | inputName, | ||
int [] | inputN, | ||
int [] | inputC, | ||
int [] | inputH, | ||
int [] | inputW, | ||
DataType [] | inputDataType, | ||
DataFormat [] | inputDataFormat, | ||
int | outputNum, | ||
String [] | outputName | ||
) |
initial model and alloc memory, and the output is decided by user
modelPath | model file path of String type |
affinity | CPU affinity setting of AffinityType(enum) type |
inputNum | the number of input data of int type |
inputName | the array of all input data's name of string type |
inputN | the array of all input data's n dimension of int type |
inputC | the array of all input data's c dimension of int type |
inputH | the array of all input data's h dimension of int type |
inputW | the array of all input data's w dimension of int type |
inputDataType | the array of all input data's data type of DataType(enum) type |
inputDataFormat | the array of all input data's data format of DataFormat(enum) type |
outputNum | the number of output data of int type |
outputName | the array of all output data's name of string type |
Definition at line 116 of file BoltModel.java.
|
protected |
clone BoltModel
Definition at line 152 of file BoltModel.java.
void com.huawei.noah.BoltModel.destructor | ( | ) |
BoltResult com.huawei.noah.BoltModel.run | ( | int | inputNum, |
String [] | inputName, | ||
float | inputData[][] | ||
) |
inference result from input
inputNum | the number of input data of int type |
inputName | the array of all input data's name of string type |
inputData | the 2D array of all input data of float type |
Definition at line 215 of file BoltModel.java.
BoltResult com.huawei.noah.BoltModel.run | ( | int | inputNum, |
String [] | inputName, | ||
int [] | inputN, | ||
int [] | inputC, | ||
int [] | inputH, | ||
int [] | inputW, | ||
DataType [] | inputDataType, | ||
DataFormat [] | inputDataFormat, | ||
float | inputData[][] | ||
) |
inference result from resized input
inputNum | the number of input data of int type |
inputName | the array of all input data's name of String type |
inputN | the array of all input data's n dimension of int type |
inputC | the array of all input data's c dimension of int type |
inputH | the array of all input data's h dimension of int type |
inputW | the array of all input data's w dimension of int type |
inputDataType | the array of all input data's data type of DataType(enum) type |
inputDataFormat | the array of all input data's data format of DataFormat(enum) type |
inputData | the 2D array of all input data of float type |
Definition at line 240 of file BoltModel.java.
native void com.huawei.noah.BoltModel.setNumThreads | ( | int | threads | ) |
set parallel threads num
threads | number of threads |
Referenced by com.huawei.noah.BoltModel.setRuntimeDeviceDynamic().
void com.huawei.noah.BoltModel.setRuntimeDevice | ( | int | cpuId, |
DeviceType | device | ||
) | throws FileNotFoundException |
set process to run on specified CPU core
cpuId | cpu core id(0, 1, 2...) |
device | cpu core architecture(ARM_A76) |
Definition at line 175 of file BoltModel.java.
void com.huawei.noah.BoltModel.setRuntimeDeviceDynamic | ( | ) | throws FileNotFoundException |
set process cpu affinity according cpu average occupy
Definition at line 188 of file BoltModel.java.
References com.huawei.noah.BoltModel.setNumThreads().