public class MxNDManager
extends ai.djl.ndarray.BaseNDManager
MxNDManager is the MXNet implementation of NDManager.| Modifier and Type | Method and Description |
|---|---|
java.nio.ByteBuffer |
allocateDirect(int capacity) |
ai.djl.ndarray.NDArray |
arange(float start,
float stop,
float step,
ai.djl.ndarray.types.DataType dataType) |
MxNDArray |
create(com.sun.jna.Pointer handle)
Creates an MxNDArray with the given Native Memory Pointer and attaches to this manager.
|
MxSparseNDArray |
create(com.sun.jna.Pointer handle,
ai.djl.ndarray.types.SparseFormat fmt)
Creates a sparse MxNDArray with the given Native Memory Pointer and attaches to this manager.
|
MxNDArray |
create(ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType) |
MxSparseNDArray |
createCSR(java.nio.Buffer data,
long[] indptr,
long[] indices,
ai.djl.ndarray.types.Shape shape) |
MxSparseNDArray |
createRowSparse(java.nio.Buffer data,
ai.djl.ndarray.types.Shape dataShape,
long[] indices,
ai.djl.ndarray.types.Shape shape) |
ai.djl.ndarray.NDArray |
eye(int rows,
int cols,
int k,
ai.djl.ndarray.types.DataType dataType) |
ai.djl.engine.Engine |
getEngine() |
void |
invoke(java.lang.String operation,
ai.djl.ndarray.NDArray[] src,
ai.djl.ndarray.NDArray[] dest,
ai.djl.util.PairList<java.lang.String,?> params) |
ai.djl.ndarray.NDArray |
invoke(java.lang.String operation,
ai.djl.ndarray.NDArray[] src,
ai.djl.util.PairList<java.lang.String,?> params)
An engine specific generic invocation to native operator.
|
ai.djl.ndarray.NDArray |
invoke(java.lang.String operation,
ai.djl.ndarray.NDArray src,
ai.djl.util.PairList<java.lang.String,?> params)
An engine specific generic invocation to native operator.
|
void |
invoke(java.lang.String operation,
ai.djl.ndarray.NDList src,
ai.djl.ndarray.NDList dest,
ai.djl.util.PairList<java.lang.String,?> params)
An engine specific generic invocation to native operator.
|
ai.djl.ndarray.NDList |
invoke(java.lang.String operation,
ai.djl.ndarray.NDList src,
ai.djl.util.PairList<java.lang.String,?> params) |
ai.djl.ndarray.NDArray |
invoke(java.lang.String operation,
ai.djl.util.PairList<java.lang.String,?> params)
An engine specific generic invocation to native operator.
|
ai.djl.ndarray.NDArray |
linspace(float start,
float stop,
int num,
boolean endpoint) |
ai.djl.ndarray.NDList |
load(java.nio.file.Path path) |
MxNDManager |
newSubManager() |
MxNDManager |
newSubManager(ai.djl.Device dev) |
ai.djl.ndarray.NDArray |
ones(ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType) |
ai.djl.ndarray.NDArray |
randomMultinomial(int n,
ai.djl.ndarray.NDArray pValues) |
ai.djl.ndarray.NDArray |
randomMultinomial(int n,
ai.djl.ndarray.NDArray pValues,
ai.djl.ndarray.types.Shape shape) |
ai.djl.ndarray.NDArray |
randomNormal(float loc,
float scale,
ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType) |
ai.djl.ndarray.NDArray |
randomUniform(float low,
float high,
ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType) |
ai.djl.ndarray.NDArray |
zeros(ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType) |
attach, close, debugDump, detach, getDevice, getParentManager, isOpen, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitarange, arange, arange, arange, arange, arange, arange, arange, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, createCSR, createRowSparse, decode, decode, eye, eye, eye, eye, linspace, linspace, linspace, linspace, load, newBaseManager, newBaseManager, newBaseManager, ones, ones, randomNormal, randomNormal, randomNormal, randomUniform, randomUniform, zeros, zerospublic java.nio.ByteBuffer allocateDirect(int capacity)
public MxNDArray create(com.sun.jna.Pointer handle)
handle - the array's native memory pointerpublic MxSparseNDArray create(com.sun.jna.Pointer handle, ai.djl.ndarray.types.SparseFormat fmt)
handle - the array's native memory pointerfmt - the sparse format to usepublic MxNDArray create(ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
public MxSparseNDArray createCSR(java.nio.Buffer data, long[] indptr, long[] indices, ai.djl.ndarray.types.Shape shape)
public MxSparseNDArray createRowSparse(java.nio.Buffer data, ai.djl.ndarray.types.Shape dataShape, long[] indices, ai.djl.ndarray.types.Shape shape)
public ai.djl.ndarray.NDList load(java.nio.file.Path path)
public ai.djl.ndarray.NDArray zeros(ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType)
public ai.djl.ndarray.NDArray ones(ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType)
public ai.djl.ndarray.NDArray arange(float start,
float stop,
float step,
ai.djl.ndarray.types.DataType dataType)
public ai.djl.ndarray.NDArray eye(int rows,
int cols,
int k,
ai.djl.ndarray.types.DataType dataType)
public ai.djl.ndarray.NDArray linspace(float start,
float stop,
int num,
boolean endpoint)
public ai.djl.ndarray.NDArray randomUniform(float low,
float high,
ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType)
public ai.djl.ndarray.NDArray randomNormal(float loc,
float scale,
ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType)
public ai.djl.ndarray.NDArray randomMultinomial(int n,
ai.djl.ndarray.NDArray pValues,
ai.djl.ndarray.types.Shape shape)
public ai.djl.ndarray.NDArray randomMultinomial(int n,
ai.djl.ndarray.NDArray pValues)
public MxNDManager newSubManager()
public MxNDManager newSubManager(ai.djl.Device dev)
public void invoke(java.lang.String operation,
ai.djl.ndarray.NDArray[] src,
ai.djl.ndarray.NDArray[] dest,
ai.djl.util.PairList<java.lang.String,?> params)
public ai.djl.ndarray.NDList invoke(java.lang.String operation,
ai.djl.ndarray.NDList src,
ai.djl.util.PairList<java.lang.String,?> params)
public void invoke(java.lang.String operation,
ai.djl.ndarray.NDList src,
ai.djl.ndarray.NDList dest,
ai.djl.util.PairList<java.lang.String,?> params)
You should avoid using this function if possible. Since this function is engine specific, using this API may cause portability issues. A native operation may not be compatible between each version.
operation - the native operation to performsrc - the NDList of source NDArraydest - the NDList to save output toparams - the parameters to be passed to the native operatorjava.lang.IllegalArgumentException - if operation is not supported by Engineai.djl.engine.EngineException - if operation failed in native enginepublic ai.djl.ndarray.NDArray invoke(java.lang.String operation,
ai.djl.ndarray.NDArray[] src,
ai.djl.util.PairList<java.lang.String,?> params)
You should avoid using this function if possible. Since this function is engine specific, using this API may cause portability issues. A native operation may not be compatible between each version.
operation - the native operation to performsrc - the array of source NDArrayparams - the parameters to be passed to the native operatorNDArrayjava.lang.IllegalArgumentException - if operation is not supported by Engineai.djl.engine.EngineException - if operation failed in native enginepublic ai.djl.ndarray.NDArray invoke(java.lang.String operation,
ai.djl.ndarray.NDArray src,
ai.djl.util.PairList<java.lang.String,?> params)
You should avoid using this function if possible. Since this function is engine specific, using this API may cause portability issues. A native operation may not be compatible between each version.
operation - the native operation to performsrc - the source NDArrayparams - the parameters to be passed to the native operatorNDArrayjava.lang.IllegalArgumentException - if operation is not supported by Engineai.djl.engine.EngineException - if operation failed in native enginepublic ai.djl.ndarray.NDArray invoke(java.lang.String operation,
ai.djl.util.PairList<java.lang.String,?> params)
You should avoid using this function if possible. Since this function is engine specific, using this API may cause portability issues. A native operation may not be compatible between each version.
operation - the native operation to performparams - the parameters to be passed to the native operatorNDArrayjava.lang.IllegalArgumentException - if operation is not supported by Engineai.djl.engine.EngineException - if operation failed in native enginepublic ai.djl.engine.Engine getEngine()