Path prefix from where to load the model artifacts. These include the symbol, parameters, and synset.txt Example: file://model-dir/resnet-152 (containing resnet-152-symbol.json, resnet-152-0000.params, and synset.txt).
Descriptors defining the input node names, shape, layout and type parameters
Note: If the input Descriptors is missing batchSize ('N' in layout), a batchSize of 1 is assumed for the model.
Device contexts on which you want to run inference; defaults to CPU
Model epoch to load; defaults to 0
Takes input as List of one dimensional iterables and creates the NDArray needed for inference The array will be reshaped based on the input descriptors.
Takes input as List of one dimensional iterables and creates the NDArray needed for inference The array will be reshaped based on the input descriptors.
A List of a one-dimensional iterables of DType Float. An extra List is needed for when the model has more than one input.
Indexed sequence array of outputs
Takes input as Array of one dimensional arrays and creates the NDArray needed for inference The array will be reshaped based on the input descriptors.
Takes input as Array of one dimensional arrays and creates the NDArray needed for inference The array will be reshaped based on the input descriptors. Example of calling in Java:
double tmp[][] = new double[1][224]; for (int x = 0; x < 1; x++) for (int y = 0; y < 224; y++) tmp[x][y] = (int)(Math.random()*10); predictor.predict(tmp);
An Array of a one-dimensional array. An extra Array is needed for when the model has more than one input.
Indexed sequence array of outputs
Takes input as Array of one dimensional arrays and creates the NDArray needed for inference The array will be reshaped based on the input descriptors.
Takes input as Array of one dimensional arrays and creates the NDArray needed for inference The array will be reshaped based on the input descriptors. Example of calling in Java:
float tmp[][] = new float[1][224]; for (int x = 0; x < 1; x++) for (int y = 0; y < 224; y++) tmp[x][y] = (int)(Math.random()*10); predictor.predict(tmp);
An Array of a one-dimensional array. An extra Array is needed for when the model has more than one input.
Indexed sequence array of outputs
Predict using NDArray as input This method is useful when the input is a batch of data Note: User is responsible for managing allocation/deallocation of input/output NDArrays.
Predict using NDArray as input This method is useful when the input is a batch of data Note: User is responsible for managing allocation/deallocation of input/output NDArrays.
Iterable of NDArrays
Output of predictions as NDArrays
The underlying Scala predictor
Implementation of prediction routines.