Class

com.github.nearbydelta.deepspark.data

StochasticGradientDescent

Related Doc: package data

Permalink

class StochasticGradientDescent extends WeightBuilder

Builder for Stochastic Gradient Descent

Basic Gradient Descent rule with mini-batch training.

Example:
  1. val algorithm = new StochasticGradientDescent(l2decay = 0.0001)
Linear Supertypes
WeightBuilder, KryoSerializable, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. StochasticGradientDescent
  2. WeightBuilder
  3. KryoSerializable
  4. Serializable
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StochasticGradientDescent()

    Permalink
  2. new StochasticGradientDescent(rate: Double = 0.03, l2decay: Double = 0.0001, momentum: Double = 0.0001)

    Permalink

    rate

    the learning rate (Default 0.03)

    l2decay

    L2 regularization factor (Default 0.0001)

    momentum

    Momentum factor for adaptive learning (Default 0.0001)

Type Members

  1. class Updater[K, X <: Tensor[K, Double]] extends Algorithm[X]

    Permalink

    Algorithm implementation.

    Algorithm implementation.

    X

    Either Matrix or DataVec

Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. final def buildMatrix(weight: Weight[Matrix], row: Int, col: Int, range: (Double, Double) = (1e-2, 2e-2), noReg: Boolean = false): Weight[Matrix]

    Permalink

    Build weight update algorithm for given Weight object.

    Build weight update algorithm for given Weight object.

    weight

    Weight object of Matrix

    row

    Size of row

    col

    Size of column

    range

    Range for random intitialization

    noReg

    True if this weight does not require regularization.

    returns

    Algorithm attached Weight object.

    Definition Classes
    WeightBuilder
  6. final def buildVector(weight: Weight[DataVec], row: Int, range: (Double, Double) = (1e-2, 2e-2), noReg: Boolean = false): Weight[DataVec]

    Permalink

    Build weight update algorithm for given Weight object.

    Build weight update algorithm for given Weight object.

    weight

    Weight object of Vector

    row

    Size of row

    range

    Range for random intitialization

    noReg

    True if this weight does not require regularization.

    returns

    Algorithm attached Weight object.

    Definition Classes
    WeightBuilder
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getUpdater(value: DataVec, noReg: Boolean): Algorithm[DataVec]

    Permalink

    Get Update Algorithm for given value.

    Get Update Algorithm for given value.

    value

    Target of alorithm.

    noReg

    True if this value does not require regularization.

    returns

    Algorithm object

    Attributes
    protected
    Definition Classes
    StochasticGradientDescentWeightBuilder
  13. def getUpdater(value: Matrix, noReg: Boolean): Algorithm[Matrix]

    Permalink

    Get Update Algorithm for given value.

    Get Update Algorithm for given value.

    value

    Target of alorithm.

    noReg

    True if this value does not require regularization.

    returns

    Algorithm object

    Attributes
    protected
    Definition Classes
    StochasticGradientDescentWeightBuilder
  14. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  16. var l2decay: Double

    Permalink

    L2 regularization factor (Default 0.0001)

  17. var momentum: Double

    Permalink

    Momentum factor for adaptive learning (Default 0.0001)

  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. var rate: Double

    Permalink

    the learning rate (Default 0.03)

  22. def read(kryo: Kryo, input: Input): Unit

    Permalink
    Definition Classes
    StochasticGradientDescent → KryoSerializable
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def write(kryo: Kryo, output: Output): Unit

    Permalink
    Definition Classes
    StochasticGradientDescent → KryoSerializable

Inherited from WeightBuilder

Inherited from KryoSerializable

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped