org.apache.mxnet

FeedForward

Related Docs: object FeedForward | package mxnet

class FeedForward extends NativeResource

Model class of MXNet for training and predicting feedforward nets. This class is designed for a single-data single output supervised network.

Linear Supertypes
NativeResource, WarnIfNotDisposed, AutoCloseable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FeedForward
  2. NativeResource
  3. WarnIfNotDisposed
  4. AutoCloseable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FeedForward(symbol: SymbolGenerator, ctx: Array[Context], numEpoch: Int, epochSize: Int, optimizer: Optimizer, initializer: Initializer, batchSize: Int, argParams: Map[String, NDArray], auxParams: Map[String, NDArray], allowExtraParams: Boolean, beginEpoch: Int)

  2. new FeedForward(symbol: Symbol, ctx: Array[Context] = Array(Context.cpu()), numEpoch: Int = 1, epochSize: Int = 1, optimizer: Optimizer = new SGD(), initializer: Initializer = new Uniform(0.01f), batchSize: Int = 128, argParams: Map[String, NDArray] = null, auxParams: Map[String, NDArray] = null, allowExtraParams: Boolean = false, beginEpoch: Int = 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. val beginEpoch: Int

    The beginning training epoch.

  6. val bytesAllocated: Long

    Off-Heap Bytes Allocated for this object

    Off-Heap Bytes Allocated for this object

    Definition Classes
    FeedForward → NativeResource
  7. def checkArguments(): Unit

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def close(): Unit

    Definition Classes
    NativeResource → AutoCloseable
  10. val creationTrace: Option[Array[StackTraceElement]]

    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed
  11. def dispose(): Unit

    Definition Classes
    FeedForward → NativeResource
  12. val epochSize: Int

    Number of batches in a epoch.

    Number of batches in a epoch. In default, it is set to ceil(num_train_examples / batch_size)

  13. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed → AnyRef
  16. def fit(trainData: DataIter, evalData: DataIter, kvStore: KVStore): Unit

  17. def fit(trainData: DataIter, evalData: DataIter, evalMetric: EvalMetric, kvStore: KVStore): Unit

  18. def fit(trainData: DataIter, evalData: DataIter, evalMetric: EvalMetric, kvStore: KVStore, epochEndCallback: EpochEndCallback, batchEndCallback: BatchEndCallback): Unit

  19. def fit(trainData: DataIter, evalData: DataIter, evalMetric: EvalMetric, kv: KVStore, epochEndCallback: EpochEndCallback, batchEndCallback: BatchEndCallback, logger: Logger, workLoadList: Seq[Float]): Unit

  20. def fit(trainData: DataIter, evalData: DataIter): Unit

  21. def fit(trainData: DataIter, evalData: DataIter, evalMetric: EvalMetric): Unit

  22. def fit(trainData: DataIter, evalData: DataIter, evalMetric: EvalMetric, kvStoreType: String): Unit

  23. def fit(trainData: DataIter, evalData: DataIter, evalMetric: EvalMetric, kvStoreType: String, epochEndCallback: EpochEndCallback, batchEndCallback: BatchEndCallback): Unit

  24. def fit(trainData: DataIter, evalData: DataIter, evalMetric: EvalMetric, kvStoreType: String, epochEndCallback: EpochEndCallback, batchEndCallback: BatchEndCallback, logger: Logger, workLoadList: Seq[Float]): Unit

    Fit the model.

    Fit the model.

    trainData

    Training data

    evalData

    Evaluation data

    evalMetric

    The evaluation metric, cannot be null

    kvStoreType

    A string kvstore type: 'local' : multi-devices on a single machine, will automatically choose one from 'local_update_cpu', 'local_allreduce_cpu', and 'local_allreduce_device' 'dist_sync' : multi-machines with BSP 'dist_async' : multi-machines with partical asynchronous In default uses 'local', often no need to change for single machine.

    epochEndCallback

    A callback that is invoked at end of each epoch. This can be used to checkpoint model each epoch.

    batchEndCallback

    A callback that is invoked at end of each batch For print purpose

    logger

    When not specified, default logger will be used.

    workLoadList

    The list of work load for different devices, in the same order as ctx

  25. def getArgParams: Map[String, NDArray]

  26. def getAuxParams: Map[String, NDArray]

  27. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  29. def isDisposed: Boolean

    Definition Classes
    NativeResource → WarnIfNotDisposed
  30. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  31. def logDisposeWarning(): Unit

    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed
  32. val logger: Logger

  33. def nativeAddress: CPtrAddress

    native Address associated with this object

    native Address associated with this object

    Definition Classes
    FeedForward → NativeResource
  34. def nativeDeAllocator: (CPtrAddress) ⇒ Int

    Function Pointer to the NativeDeAllocator of nativeAddress

    Function Pointer to the NativeDeAllocator of nativeAddress

    Definition Classes
    FeedForward → NativeResource
  35. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  38. var predExec: Executor

  39. def predict(data: DataIter, numBatch: Int = 1): Array[NDArray]

    Run the prediction, always only use one device.

    Run the prediction, always only use one device.

    data

    eval data

    numBatch

    the number of batch to run. Go though all batches if set -1

    returns

    The predicted value of the output. Note the network may have multiple outputs, thus it return an array of NDArray

  40. val ref: NativeResourceRef

    Call NativeResource.register to get the reference

    Call NativeResource.register to get the reference

    Definition Classes
    FeedForward → NativeResource
  41. def register(): NativeResourceRef

    Register this object for PhantomReference tracking and in ResourceScope if used inside ResourceScope.

    Register this object for PhantomReference tracking and in ResourceScope if used inside ResourceScope.

    returns

    NativeResourceRef that tracks reachability of this object using PhantomReference

    Definition Classes
    NativeResource
  42. def save(prefix: String, epoch: Int = this.numEpoch): Unit

    Checkpoint the model checkpoint into file.

    Checkpoint the model checkpoint into file. You can also use pickle to do the job if you only work on python. The advantage of load/save is the file is language agnostic. This means the file saved using save can be loaded by other language binding of mxnet. You also get the benefit being able to directly load/save from cloud storage(S3, HDFS)

    prefix

    Prefix of model name.

    Note

    - prefix-symbol.json will be saved for symbol. - prefix-epoch.params will be saved for parameters.

    See also

    FeedForward.load : the method to load the model back.

  43. def serialize(): Array[Byte]

    Serialize the model to Java byte array

    Serialize the model to Java byte array

    returns

    serialized model bytes

  44. def setMonitor(m: Monitor): Unit

  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  46. def toString(): String

    Definition Classes
    AnyRef → Any
  47. def tracingEnabled: Boolean

    Attributes
    protected
    Definition Classes
    WarnIfNotDisposed
  48. def unsetMonitor(): Unit

  49. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from NativeResource

Inherited from WarnIfNotDisposed

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped