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.ndarray.NDArray |
full(ai.djl.ndarray.types.Shape shape,
float value,
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(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 |
randomInteger(long low,
long high,
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, create, createCoo, debugDump, detach, getDevice, getName, getParentManager, isOpen, newSubManager, setName, 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, full, full, full, 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)
create in interface ai.djl.ndarray.NDManagercreate in class ai.djl.ndarray.BaseNDManagerpublic MxSparseNDArray createCSR(java.nio.Buffer data, long[] indptr, long[] indices, ai.djl.ndarray.types.Shape shape)
createCSR in interface ai.djl.ndarray.NDManagercreateCSR in class ai.djl.ndarray.BaseNDManagerpublic MxSparseNDArray createRowSparse(java.nio.Buffer data, ai.djl.ndarray.types.Shape dataShape, long[] indices, ai.djl.ndarray.types.Shape shape)
createRowSparse in interface ai.djl.ndarray.NDManagercreateRowSparse in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDList load(java.nio.file.Path path)
load in interface ai.djl.ndarray.NDManagerload in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray zeros(ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType)
zeros in interface ai.djl.ndarray.NDManagerzeros in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray ones(ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType)
ones in interface ai.djl.ndarray.NDManagerones in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray full(ai.djl.ndarray.types.Shape shape,
float value,
ai.djl.ndarray.types.DataType dataType)
full in interface ai.djl.ndarray.NDManagerfull in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray arange(float start,
float stop,
float step,
ai.djl.ndarray.types.DataType dataType)
arange in interface ai.djl.ndarray.NDManagerarange in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray eye(int rows,
int cols,
int k,
ai.djl.ndarray.types.DataType dataType)
eye in interface ai.djl.ndarray.NDManagereye in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray linspace(float start,
float stop,
int num,
boolean endpoint)
linspace in interface ai.djl.ndarray.NDManagerlinspace in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray randomInteger(long low,
long high,
ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType)
randomInteger in interface ai.djl.ndarray.NDManagerrandomInteger in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray randomUniform(float low,
float high,
ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType)
randomUniform in interface ai.djl.ndarray.NDManagerrandomUniform in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray randomNormal(float loc,
float scale,
ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType)
randomNormal in interface ai.djl.ndarray.NDManagerrandomNormal in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray randomMultinomial(int n,
ai.djl.ndarray.NDArray pValues,
ai.djl.ndarray.types.Shape shape)
randomMultinomial in interface ai.djl.ndarray.NDManagerrandomMultinomial in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDArray randomMultinomial(int n,
ai.djl.ndarray.NDArray pValues)
randomMultinomial in interface ai.djl.ndarray.NDManagerrandomMultinomial in class ai.djl.ndarray.BaseNDManagerpublic 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)
invoke in interface ai.djl.ndarray.NDManagerinvoke in class ai.djl.ndarray.BaseNDManagerpublic ai.djl.ndarray.NDList invoke(java.lang.String operation,
ai.djl.ndarray.NDList src,
ai.djl.util.PairList<java.lang.String,?> params)
invoke in interface ai.djl.ndarray.NDManagerinvoke in class ai.djl.ndarray.BaseNDManagerpublic 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 final ai.djl.engine.Engine getEngine()