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, AutoCloseable

public class PpNDArray extends ai.djl.ndarray.NDArrayAdapter
PpNDArray is the PaddlePaddle implementation of NDArray.
  • Field Summary

    Fields inherited from class ai.djl.ndarray.NDArrayAdapter

    alternativeManager, dataType, isClosed, manager, name, shape, uid
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    void
    ai.djl.ndarray.types.DataType
    long
    Gets the Pointer to this resource.
    long[][]
    Gets the Level-of-Detail field of the NDArray.
    ai.djl.ndarray.types.Shape
    void
    intern(ai.djl.ndarray.NDArray replaced)
    void
    setLoD(long[][] lod)
    Sets the Level-of-Detail field of the NDArray.
    void

    Methods inherited from class ai.djl.ndarray.NDArrayAdapter

    abs, acos, acosh, add, add, addi, addi, argMax, argMax, argMin, argMin, argSort, asin, asinh, atan, atan2, atanh, attach, batchDot, batchMatMul, booleanMask, broadcast, cbrt, ceil, clip, complex, contentEquals, contentEquals, cos, cosh, cumProd, cumProd, cumSum, cumSum, div, div, divi, divi, dot, eq, eq, equals, erf, erfinv, exp, expandDims, fft, fft2, flatten, flatten, flip, floor, gammaln, gather, gatherNd, get, getDevice, getGradient, getManager, getNDArrayInternal, getSparseFormat, getUid, gt, gt, gte, gte, hasGradient, hashCode, ifft2, inverse, isInfinite, isNaN, isReleased, 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, normalize, oneHot, percentile, percentile, pow, pow, powi, powi, prod, prod, put, real, repeat, repeat, repeat, repeat, reshape, rotate90, round, scatter, sequenceMask, sequenceMask, set, set, set, set, set, setRequiresGradient, setScalar, sign, signi, sin, sinh, softmax, sort, sort, split, split, sqrt, square, squeeze, stft, stopGradient, sub, sub, subi, subi, sum, sum, take, tan, tanh, tempAttach, tile, tile, tile, tile, toDegrees, toDense, toDevice, topK, toRadians, toSparse, toString, toStringArray, toType, trace, transpose, transpose, trunc, unique, xlogy

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface ai.djl.ndarray.BytesSupplier

    getAsBytes, getAsObject, getAsString

    Methods inherited from interface ai.djl.ndarray.NDArray

    all, allClose, allClose, any, argSort, argSort, booleanMask, broadcast, concat, concat, copyTo, countNonzero, countNonzero, duplicate, encode, fft, fft2, get, get, get, get, get, getBoolean, getByte, getDouble, getFloat, getInt, getLong, getResourceNDArrays, getScalar, getUint8, ifft2, isEmpty, isScalar, isSparse, like, max, mean, min, none, norm, norm, norm, normalize, normalize, oneHot, oneHot, onesLike, prod, reshape, scaleGradient, set, set, set, set, set, shapeEquals, size, size, split, split, squeeze, squeeze, stack, stack, stft, sum, swapAxes, take, toArray, toBooleanArray, toByteArray, toDebugString, toDebugString, toDebugString, toDoubleArray, toFloatArray, toIntArray, toLongArray, topK, toShortArray, toStringArray, toUint8Array, toUnsignedIntArray, toUnsignedShortArray, trace, trace, unique, unique, zerosLike

    Methods inherited from interface ai.djl.ndarray.NDResource

    returnResource
  • Method Details

    • 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 String getName()
      Specified by:
      getName in interface ai.djl.ndarray.NDArray
      Overrides:
      getName in class ai.djl.ndarray.NDArrayAdapter
    • setName

      public void setName(String name)
      Specified by:
      setName in interface ai.djl.ndarray.NDArray
      Overrides:
      setName in class ai.djl.ndarray.NDArrayAdapter
    • getDataType

      public ai.djl.ndarray.types.DataType getDataType()
      Specified by:
      getDataType in interface ai.djl.ndarray.NDArray
      Overrides:
      getDataType in class ai.djl.ndarray.NDArrayAdapter
    • getShape

      public ai.djl.ndarray.types.Shape getShape()
      Specified by:
      getShape in interface ai.djl.ndarray.NDArray
      Overrides:
      getShape in class ai.djl.ndarray.NDArrayAdapter
    • intern

      public void intern(ai.djl.ndarray.NDArray replaced)
    • detach

      public void detach()
    • toByteBuffer

      public ByteBuffer toByteBuffer()
    • getHandle

      public long getHandle()
      Gets the Pointer to this resource.
      Returns:
      the Pointer to this resource
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface ai.djl.ndarray.NDArray
      Specified by:
      close in interface ai.djl.ndarray.NDResource
      Overrides:
      close in class ai.djl.ndarray.NDArrayAdapter