com.intel.analytics.bigdl.optim

Optimizer

abstract class Optimizer[T, D] extends AnyRef

Optimizer is an abstract class which is used to train a model automatically with some certain optimization algorithms.

T

numeric type, which can be Float or Double

D

the type of elements in DataSet, such as MiniBatch

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

Instance Constructors

  1. new Optimizer(model: Module[T], dataset: DataSet[D], criterion: Criterion[T])(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    model

    the model to be trained

    dataset

    the data set used to train a model

    criterion

    the criterion used to evaluate the loss of the model given an input

Abstract Value Members

  1. abstract def optimize(): Module[T]

    Trigger the optimization process

    Trigger the optimization process

    returns

    the model to be trained

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. var checkSingleton: Boolean

    Attributes
    protected
  8. var checkpointPath: Option[String]

    Attributes
    protected
  9. var checkpointTrigger: Option[Trigger]

    Attributes
    protected
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. var computeThresholdbatchSize: Int

    Attributes
    protected
  12. val criterion: Criterion[T]

    the criterion used to evaluate the loss of the model given an input

    the criterion used to evaluate the loss of the model given an input

    Attributes
    protected
  13. val dataset: DataSet[D]

    the data set used to train a model

    the data set used to train a model

    Attributes
    protected
  14. var dropPercentage: Double

    Attributes
    protected
  15. var endWhen: Trigger

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def getCheckpointPath(): Option[String]

    Get the directory of saving checkpoint

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

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

    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. var isOverWrite: Boolean

    Attributes
    protected
  24. var maxDropPercentage: Double

    Attributes
    protected
  25. var model: Module[T]

    the model to be trained

    the model to be trained

    Attributes
    protected
  26. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  29. var optimMethod: OptimMethod[T]

    Attributes
    protected
  30. def overWriteCheckpoint(): Optimizer.this.type

    Enable overwrite saving checkpoint

  31. def prepareInput(): Unit

  32. def setCheckpoint(path: String, trigger: Trigger): Optimizer.this.type

    Set a check point saved at path triggered by trigger

    Set a check point saved at path triggered by trigger

    path

    the directory to save

    trigger

    how often to save the check point

    returns

    the optimizer

  33. def setDropModuleProperty(dropPercentage: Double, maxDropPercentage: Double, batchsize: Int = 100, warmupIteration: Int = 200): Optimizer.this.type

    Set dropping a certain percentage (dropPercentage) of models during distributed training to accelerate, because some cached model may take too long.

    Set dropping a certain percentage (dropPercentage) of models during distributed training to accelerate, because some cached model may take too long.

    dropPercentage

    drop percentage

    maxDropPercentage

    max drop percentage

    batchsize

    batch size

    warmupIteration

    how may iteration to warm up

    returns

    this optimizer

  34. def setEndWhen(endWhen: Trigger): Optimizer.this.type

    When to stop, passed in a Trigger

    When to stop, passed in a Trigger

    endWhen

    when to end

    returns

    the optimizer

  35. def setModel(newModel: Module[T]): Optimizer.this.type

    Set a model to the optimizer

    Set a model to the optimizer

    newModel

    new model

  36. def setOptimMethod(method: OptimMethod[T]): Optimizer.this.type

    Set an optimization method

    Set an optimization method

    method

    optimization method

  37. def setState(state: Table): Optimizer.this.type

    Set a state(learning rate, epochs.

    Set a state(learning rate, epochs...) to the optimizer

    state

    the state to be saved

  38. def setTrainSummary(trainSummary: TrainSummary): Optimizer.this.type

    Enable train summary.

  39. def setValidation(trigger: Trigger, sampleRDD: RDD[Sample[T]], vMethods: Array[ValidationMethod[T]], batchSize: Int): Optimizer.this.type

    Set a validate evaluation

    Set a validate evaluation

    trigger

    how often to evaluation validation set

    sampleRDD

    validate data set in type of RDD of Sample

    vMethods

    a set of validation method ValidationMethod

    batchSize

    batch size

    returns

    this optimizer

  40. def setValidation(trigger: Trigger, sampleRDD: RDD[Sample[T]], vMethods: Array[ValidationMethod[T]], batchSize: Int, featurePaddingParam: PaddingParam[T], labelPaddingParam: PaddingParam[T]): Optimizer.this.type

    Set a validate evaluation

    Set a validate evaluation

    trigger

    how often to evaluation validation set

    sampleRDD

    validate data set in type of RDD of Sample

    vMethods

    a set of validation method ValidationMethod

    batchSize

    batch size

    featurePaddingParam

    feature padding strategy, see com.intel.analytics.bigdl.dataset.PaddingParam for details.

    labelPaddingParam

    label padding strategy, see com.intel.analytics.bigdl.dataset.PaddingParam for details.

    returns

    this optimizer

  41. def setValidation(trigger: Trigger, dataset: DataSet[MiniBatch[T]], vMethods: Array[ValidationMethod[T]]): Optimizer.this.type

    Set a validate evaluation

    Set a validate evaluation

    trigger

    how often to evaluation validation set

    dataset

    validate data set in type of DataSet of MiniBatch

    vMethods

    a set of validation method ValidationMethod

    returns

    this optimizer

  42. def setValidationSummary(validationSummary: ValidationSummary): Optimizer.this.type

    Enable validation summary.

  43. var state: Table

    Attributes
    protected
  44. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  45. def toString(): String

    Definition Classes
    AnyRef → Any
  46. var trainSummary: Option[TrainSummary]

    Attributes
    protected
  47. var validationDataSet: Option[DataSet[MiniBatch[T]]]

    Attributes
    protected
  48. var validationMethods: Option[Array[ValidationMethod[T]]]

    Attributes
    protected
  49. var validationSummary: Option[ValidationSummary]

    Attributes
    protected
  50. var validationTrigger: Option[Trigger]

    Attributes
    protected
  51. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. var warmupIterationNum: Int

    Attributes
    protected

Deprecated Value Members

  1. def disableCheckSingleton(): Optimizer.this.type

    make optimizer not check the singleton model on a node

    make optimizer not check the singleton model on a node

    returns

    Annotations
    @deprecated
    Deprecated

    (Since version 0.1.0) Use bigdl.check.singleton instead

Inherited from AnyRef

Inherited from Any

Ungrouped