Package ai.djl.paddlepaddle.engine
Class PpNDArray
- java.lang.Object
-
- ai.djl.ndarray.NDArrayAdapter
-
- ai.djl.paddlepaddle.engine.PpNDArray
-
- All Implemented Interfaces:
ai.djl.ndarray.BytesSupplier,ai.djl.ndarray.NDArray,ai.djl.ndarray.NDResource,java.lang.AutoCloseable
public class PpNDArray extends ai.djl.ndarray.NDArrayAdapterPpNDArrayis the PaddlePaddle implementation ofNDArray.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddetach()ai.djl.ndarray.types.DataTypegetDataType()longgetHandle()Gets thePointerto this resource.long[][]getLoD()Gets the Level-of-Detail field of the NDArray.java.lang.StringgetName()ai.djl.ndarray.types.ShapegetShape()voidintern(ai.djl.ndarray.NDArray replaced)voidsetLoD(long[][] lod)Sets the Level-of-Detail field of the NDArray.voidsetName(java.lang.String name)java.nio.ByteBuffertoByteBuffer()-
Methods inherited from class ai.djl.ndarray.NDArrayAdapter
abs, acos, acosh, add, add, addi, addi, argMax, argMax, argMin, argMin, argSort, asin, asinh, atan, atanh, attach, batchDot, booleanMask, broadcast, cbrt, ceil, clip, contentEquals, contentEquals, copyTo, cos, cosh, cumSum, cumSum, div, div, divi, divi, dot, eq, eq, erfinv, exp, expandDims, flatten, flip, floor, getDevice, getGradient, getManager, getNDArrayInternal, getSparseFormat, getUid, gt, gt, gte, gte, hasGradient, isInfinite, isNaN, log, log10, log2, logicalAnd, logicalNot, logicalOr, logicalXor, logSoftmax, lt, lt, lte, lte, matMul, max, max, maximum, maximum, mean, mean, median, median, min, min, minimum, minimum, mod, mod, modi, modi, mul, mul, muli, muli, neg, negi, neq, neq, nonzero, norm, norm, oneHot, percentile, percentile, pow, pow, powi, powi, prod, prod, repeat, repeat, repeat, repeat, reshape, rotate90, round, sequenceMask, sequenceMask, set, set, set, set, set, setRequiresGradient, setScalar, sign, signi, sin, sinh, softmax, sort, sort, split, split, sqrt, square, squeeze, stopGradient, sub, sub, subi, subi, sum, sum, tan, tanh, tempAttach, tile, tile, tile, tile, toDegrees, toDense, toDevice, toRadians, toSparse, toString, toStringArray, toType, trace, transpose, transpose, trunc
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ai.djl.ndarray.NDArray
all, allClose, allClose, any, argSort, argSort, booleanMask, broadcast, concat, concat, countNonzero, countNonzero, duplicate, encode, get, get, get, get, getBoolean, getByte, getDouble, getFloat, getInt, getLong, getScalar, getUint8, isEmpty, isScalar, isSparse, like, max, mean, min, none, norm, norm, norm, oneHot, oneHot, onesLike, prod, reshape, scaleGradient, set, set, set, set, set, shapeEquals, size, size, split, split, squeeze, squeeze, stack, stack, sum, swapAxes, toArray, toBooleanArray, toByteArray, toDebugString, toDebugString, toDoubleArray, toFloatArray, toIntArray, toLongArray, toStringArray, toUint8Array, trace, trace, zerosLike
-
-
-
-
Method Detail
-
setLoD
public void setLoD(long[][] lod)
Sets the Level-of-Detail field of the NDArray.checkout https://www.bookstack.cn/read/PaddlePaddle-1.3-fluid/27.md
- Parameters:
lod- the Level-of-Detail representation
-
getLoD
public long[][] getLoD()
Gets the Level-of-Detail field of the NDArray.- Returns:
- the Level-of-Detail representation
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceai.djl.ndarray.NDArray- Overrides:
getNamein classai.djl.ndarray.NDArrayAdapter
-
setName
public void setName(java.lang.String name)
- Specified by:
setNamein interfaceai.djl.ndarray.NDArray- Overrides:
setNamein classai.djl.ndarray.NDArrayAdapter
-
getDataType
public ai.djl.ndarray.types.DataType getDataType()
- Specified by:
getDataTypein interfaceai.djl.ndarray.NDArray- Overrides:
getDataTypein classai.djl.ndarray.NDArrayAdapter
-
getShape
public ai.djl.ndarray.types.Shape getShape()
- Specified by:
getShapein interfaceai.djl.ndarray.NDArray- Overrides:
getShapein classai.djl.ndarray.NDArrayAdapter
-
intern
public void intern(ai.djl.ndarray.NDArray replaced)
-
detach
public void detach()
-
toByteBuffer
public java.nio.ByteBuffer toByteBuffer()
-
getHandle
public long getHandle()
Gets thePointerto this resource.- Returns:
- the
Pointerto this resource
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceai.djl.ndarray.NDArray- Specified by:
closein interfaceai.djl.ndarray.NDResource- Overrides:
closein classai.djl.ndarray.NDArrayAdapter
-
-