public class PtNDManager
extends ai.djl.ndarray.BaseNDManager
PtNDManager
is the PyTorch 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) |
ai.djl.ndarray.NDArray |
arange(int start,
int stop,
int step,
ai.djl.ndarray.types.DataType dataType) |
PtNDArray |
create(java.nio.Buffer data,
ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType) |
PtNDArray |
create(Pointer handle)
Creates an
PtNDArray with the given Native Memory Pointer and attaches to this
manager. |
PtNDArray |
create(ai.djl.ndarray.types.Shape shape,
ai.djl.ndarray.types.DataType dataType) |
ai.djl.ndarray.NDArray |
createCSR(java.nio.Buffer data,
long[] indptr,
long[] indices,
ai.djl.ndarray.types.Shape shape) |
ai.djl.ndarray.NDArray |
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.NDList |
invoke(java.lang.String operation,
ai.djl.ndarray.NDList src,
ai.djl.util.PairList<java.lang.String,?> params) |
ai.djl.ndarray.NDArray |
linspace(float start,
float stop,
int num,
boolean endpoint) |
ai.djl.ndarray.NDList |
load(java.nio.file.Path path) |
PtNDManager |
newSubManager() |
PtNDManager |
newSubManager(ai.djl.Device device) |
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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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, createCSR, createRowSparse, decode, decode, eye, eye, eye, eye, linspace, linspace, linspace, linspace, load, newBaseManager, newBaseManager, newBaseManager, ones, ones, randomNormal, randomNormal, randomNormal, randomUniform, randomUniform, zeros, zeros
public java.nio.ByteBuffer allocateDirect(int capacity)
public PtNDArray create(Pointer handle)
PtNDArray
with the given Native Memory Pointer and attaches to this
manager.handle
- the array's native memory pointerpublic PtNDArray create(ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
public PtNDArray create(java.nio.Buffer data, ai.djl.ndarray.types.Shape shape, ai.djl.ndarray.types.DataType dataType)
public ai.djl.ndarray.NDArray createCSR(java.nio.Buffer data, long[] indptr, long[] indices, ai.djl.ndarray.types.Shape shape)
public ai.djl.ndarray.NDArray 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(int start, int stop, int step, 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)
public ai.djl.ndarray.NDArray randomMultinomial(int n, ai.djl.ndarray.NDArray pValues, ai.djl.ndarray.types.Shape shape)
public PtNDManager newSubManager()
public PtNDManager newSubManager(ai.djl.Device device)
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 ai.djl.engine.Engine getEngine()