com.intel.analytics.bigdl.optim

DistriOptimizerV2

class DistriOptimizerV2[T] extends Optimizer[T, MiniBatch[T]]

The optimizer run on a distributed cluster.

Linear Supertypes
Optimizer[T, MiniBatch[T]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DistriOptimizerV2
  2. Optimizer
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DistriOptimizerV2(_model: Module[T], _dataset: DistributedDataSet[MiniBatch[T]], _criterion: Criterion[T])(implicit arg0: ClassTag[T], ev: TensorNumeric[T])

    _model

    train model

    _dataset

    train dataset

    _criterion

    loss function

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
    Definition Classes
    Optimizer
  8. var checkpointPath: Option[String]

    Attributes
    protected
    Definition Classes
    Optimizer
  9. var checkpointTrigger: Option[Trigger]

    Attributes
    protected
    Definition Classes
    Optimizer
  10. def clearState(): Unit

    Clean some internal states, so this or other optimizers can run optimize again

    Clean some internal states, so this or other optimizers can run optimize again

    This method will be called at the end of optimize. You need not call it if optimize succeed. If the optimize fails, you may call it before next optimize.

  11. def clone(): AnyRef

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

    Attributes
    protected
    Definition Classes
    Optimizer
  13. def context: TrainingContext[T]

  14. var criterion: Criterion[T]

    Attributes
    protected
    Definition Classes
    Optimizer
  15. var dataset: DataSet[MiniBatch[T]]

    Attributes
    protected
    Definition Classes
    Optimizer
  16. def disableGradientClipping(): DistriOptimizerV2.this.type

    Disable gradient clipping

    Disable gradient clipping

    returns

    Definition Classes
    Optimizer
  17. var dropPercentage: Double

    Attributes
    protected
    Definition Classes
    Optimizer
  18. var endWhen: Trigger

    Attributes
    protected
    Definition Classes
    Optimizer
  19. final def eq(arg0: AnyRef): Boolean

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

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

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

    Get the directory of saving checkpoint

    Get the directory of saving checkpoint

    Definition Classes
    Optimizer
  23. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  26. var isOverWrite: Boolean

    Attributes
    protected
    Definition Classes
    Optimizer
  27. var maxDropPercentage: Double

    Attributes
    protected
    Definition Classes
    Optimizer
  28. var model: Module[T]

    Attributes
    protected
    Definition Classes
    Optimizer
  29. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  32. var optimMethods: Map[String, OptimMethod[T]]

    Attributes
    protected
    Definition Classes
    Optimizer
  33. def optimize(): Module[T]

    Trigger the optimization process

    Trigger the optimization process

    returns

    the model to be trained

    Definition Classes
    DistriOptimizerV2Optimizer
  34. def overWriteCheckpoint(): DistriOptimizerV2.this.type

    Enable overwrite saving checkpoint

    Enable overwrite saving checkpoint

    Definition Classes
    Optimizer
  35. var parameterProcessors: ArrayBuffer[ParameterProcessor]

    a list of ParameterProcessor, orders matter

    a list of ParameterProcessor, orders matter

    Attributes
    protected
    Definition Classes
    Optimizer
  36. def prepareInput(): Unit

    Definition Classes
    DistriOptimizerV2Optimizer
  37. def reserveOptim(reserve: Boolean): DistriOptimizerV2.this.type

    If you want to reserve optimMethod for each worker and reuse those methods in next training task, please set reserve = true Otherwise, if just using optimMethod you set in optimizer, please set reserve = false

    If you want to reserve optimMethod for each worker and reuse those methods in next training task, please set reserve = true Otherwise, if just using optimMethod you set in optimizer, please set reserve = false

    reserve

    whether to reserve optim method for each worker

    returns

    Definition Classes
    DistriOptimizerV2Optimizer
  38. def resetContext(): DistriOptimizerV2.this.type

  39. def setCheckpoint(path: String, trigger: Trigger): DistriOptimizerV2.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

    Definition Classes
    Optimizer
  40. def setConstantGradientClipping(min: Double, max: Double): DistriOptimizerV2.this.type

    Set constant gradient clipping

    Set constant gradient clipping

    min

    the minimum value to clip by

    max

    the maximum value to clip by

    returns

    Definition Classes
    Optimizer
  41. def setContext(context: TrainingContext[T]): Unit

  42. def setCriterion(newCriterion: Criterion[T]): DistriOptimizerV2.this.type

    Set a new criterion to the optimizer

    Set a new criterion to the optimizer

    newCriterion

    new criterion

    Definition Classes
    Optimizer
  43. def setDropModuleProperty(dropPercentage: Double, maxDropPercentage: Double, batchsize: Int = 100, warmupIteration: Int = 200): DistriOptimizerV2.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

    Definition Classes
    Optimizer
  44. def setEndWhen(endWhen: Trigger): DistriOptimizerV2.this.type

    When to stop, passed in a Trigger

    When to stop, passed in a Trigger

    endWhen

    when to end

    returns

    the optimizer

    Definition Classes
    Optimizer
  45. def setGradientClippingByl2Norm(l2NormThreshold: Double): DistriOptimizerV2.this.type

    Clip gradient to a maximum L2-norm

    Clip gradient to a maximum L2-norm

    l2NormThreshold

    gradient L2-Norm threshold

    returns

    Definition Classes
    Optimizer
  46. def setLogger(logger: OptimizerLogger): Unit

  47. def setModel(newModel: Module[T]): DistriOptimizerV2.this.type

    Set a model to the optimizer.

    Set a model to the optimizer. Notice: if current optimMethod in this optimizer is not a global optimMethod, this setModel will throw an exception. You should use setModelAndOptimMethods instead.

    newModel

    new model

    Definition Classes
    Optimizer
  48. def setModelAndOptimMethods(newModel: Module[T], newOptimMethods: Map[String, OptimMethod[T]]): DistriOptimizerV2.this.type

    Set new model and new optimMethods to the optimizer.

    Set new model and new optimMethods to the optimizer.

    newModel

    new model

    newOptimMethods

    new optimMethods

    Definition Classes
    Optimizer
  49. def setOptimMethod(method: OptimMethod[T]): DistriOptimizerV2.this.type

    Set an optimization method

    Set an optimization method

    method

    optimization method

    Definition Classes
    Optimizer
  50. def setOptimMethods(method: Map[String, OptimMethod[T]]): DistriOptimizerV2.this.type

    Set optimization methods for each submodule.

    Set optimization methods for each submodule.

    method

    A mapping of submodule -> OptimMethod

    Definition Classes
    Optimizer
  51. def setReuse(): DistriOptimizerV2.this.type

  52. def setState(state: Table): DistriOptimizerV2.this.type

    Set a state(learning rate, epochs.

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

    state

    the state to be saved

    Definition Classes
    Optimizer
  53. def setTrainData(sampleRDD: RDD[Sample[T]], batchSize: Int, featurePaddingParam: PaddingParam[T] = null, labelPaddingParam: PaddingParam[T] = null): DistriOptimizerV2.this.type

    Set new train dataset.

    Set new train dataset.

    sampleRDD

    training Samples

    batchSize

    mini 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

    the optimizer

    Definition Classes
    DistriOptimizerV2Optimizer
  54. def setTrainData(sampleRDD: RDD[Sample[T]], batchSize: Int, miniBatch: MiniBatch[T]): DistriOptimizerV2.this.type

    Set new train dataset.

    Set new train dataset. User can supply a customized implementation of trait MiniBatch to define how data is organized and retrieved in a mini batch.

    sampleRDD

    training Samples

    batchSize

    mini batch size

    returns

    the Optimizer

    Definition Classes
    DistriOptimizerV2Optimizer
  55. def setTrainSummary(trainSummary: TrainSummary): DistriOptimizerV2.this.type

    Enable train summary.

    Enable train summary.

    Definition Classes
    Optimizer
  56. def setValidation(trigger: Trigger, sampleRDD: RDD[Sample[T]], vMethods: Array[ValidationMethod[T]], batchSize: Int, miniBatch: MiniBatch[T]): DistriOptimizerV2.this.type

    Set validate evaluation

    Set 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

    miniBatch

    construct MiniBatch with a specified miniBatch type

    returns

    Definition Classes
    Optimizer
  57. def setValidation(trigger: Trigger, sampleRDD: RDD[Sample[T]], vMethods: Array[ValidationMethod[T]], batchSize: Int): DistriOptimizerV2.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

    Definition Classes
    Optimizer
  58. def setValidation(trigger: Trigger, sampleRDD: RDD[Sample[T]], vMethods: Array[ValidationMethod[T]], batchSize: Int, featurePaddingParam: PaddingParam[T], labelPaddingParam: PaddingParam[T]): DistriOptimizerV2.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

    Definition Classes
    Optimizer
  59. def setValidation(trigger: Trigger, dataset: DataSet[MiniBatch[T]], vMethods: Array[ValidationMethod[T]]): DistriOptimizerV2.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

    Definition Classes
    Optimizer
  60. def setValidationSummary(validationSummary: ValidationSummary): DistriOptimizerV2.this.type

    Enable validation summary.

    Enable validation summary.

    Definition Classes
    Optimizer
  61. var state: Table

    Attributes
    protected
    Definition Classes
    Optimizer
  62. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  63. def toString(): String

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

    Attributes
    protected
    Definition Classes
    Optimizer
  65. var validationDataSet: Option[DataSet[MiniBatch[T]]]

    Attributes
    protected
    Definition Classes
    Optimizer
  66. var validationMethods: Option[Array[ValidationMethod[T]]]

    Attributes
    protected
    Definition Classes
    Optimizer
  67. var validationSummary: Option[ValidationSummary]

    Attributes
    protected
    Definition Classes
    Optimizer
  68. var validationTrigger: Option[Trigger]

    Attributes
    protected
    Definition Classes
    Optimizer
  69. final def wait(): Unit

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

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

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

    Attributes
    protected
    Definition Classes
    Optimizer

Deprecated Value Members

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

    make optimizer not check the singleton model on a node

    make optimizer not check the singleton model on a node

    returns

    Definition Classes
    Optimizer
    Annotations
    @deprecated
    Deprecated

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

Inherited from Optimizer[T, MiniBatch[T]]

Inherited from AnyRef

Inherited from Any

Ungrouped