org.apache.mxnet.infer

Predictor

Related Doc: package infer

class Predictor extends PredictBase

Implementation of prediction routines.

Linear Supertypes
PredictBase, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Predictor
  2. PredictBase
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Predictor(modelPathPrefix: String, inputDescriptors: IndexedSeq[DataDesc], contexts: Array[Context] = Context.cpu(), epoch: Option[Int] = Some(0))

    modelPathPrefix

    Path prefix from where to load the model artifacts. These include the symbol, parameters, and synset.txt Example: file://model-dir/resnet-152 (containing resnet-152-symbol.json, resnet-152-0000.params, and synset.txt).

    inputDescriptors

    Descriptors defining the input node names, shape, layout and type parameters

    Note: If the input Descriptors is missing batchSize ('N' in layout), a batchSize of 1 is assumed for the model.

    contexts

    Device contexts on which you want to run inference; defaults to CPU

    epoch

    Model epoch to load; defaults to 0

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. var batchIndex: Int

    Attributes
    protected[org.apache.mxnet.infer]
  6. var batchSize: Int

    Attributes
    protected[org.apache.mxnet.infer]
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val contexts: Array[Context]

    Device contexts on which you want to run inference; defaults to CPU

    Device contexts on which you want to run inference; defaults to CPU

    Attributes
    protected
  9. val epoch: Option[Int]

    Model epoch to load; defaults to 0

    Model epoch to load; defaults to 0

    Attributes
    protected
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. var iDescriptors: IndexedSeq[DataDesc]

    Attributes
    protected[org.apache.mxnet.infer]
  16. val inputDescriptors: IndexedSeq[DataDesc]

    Descriptors defining the input node names, shape, layout and type parameters

    Descriptors defining the input node names, shape, layout and type parameters

    Note: If the input Descriptors is missing batchSize ('N' in layout), a batchSize of 1 is assumed for the model.

    Attributes
    protected
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. val mod: Module

    Attributes
    protected[org.apache.mxnet.infer]
  19. val mxNetHandler: MXNetHandler

    Attributes
    protected[org.apache.mxnet.infer]
  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def outputShapes: IndexedSeq[(String, Shape)]

    Get model output shapes.

    Get model output shapes.

    returns

    model output shapes.

    Definition Classes
    Predictor → PredictBase
  24. def predict[T](input: IndexedSeq[Array[T]]): IndexedSeq[Array[T]]

    Takes input as IndexedSeq one dimensional arrays and creates the NDArray needed for inference The array will be reshaped based on the input descriptors.

    Takes input as IndexedSeq one dimensional arrays and creates the NDArray needed for inference The array will be reshaped based on the input descriptors.

    T

    The Scala equivalent of the DType used for the input array and return value

    returns

    Indexed sequence array of outputs

    Definition Classes
    Predictor → PredictBase
  25. def predictWithNDArray(inputBatch: IndexedSeq[NDArray]): IndexedSeq[NDArray]

    Predict using NDArray as input This method is useful when the input is a batch of data Note: User is responsible for managing allocation/deallocation of input/output NDArrays.

    Predict using NDArray as input This method is useful when the input is a batch of data Note: User is responsible for managing allocation/deallocation of input/output NDArrays.

    inputBatch

    IndexedSequence NDArrays

    returns

    Output of predictions as NDArrays

    Definition Classes
    Predictor → PredictBase
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toString(): String

    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from PredictBase

Inherited from AnyRef

Inherited from Any

Ungrouped