Class/Object

org.platanios.tensorflow.api.ops.training.optimizers.schedules

CosineDecay

Related Docs: object CosineDecay | package schedules

Permalink

class CosineDecay extends Schedule

Cosine decay method.

This method applies a cosine decay function to a provided initial learning rate (i.e., value). It requires a step value to be provided in it's application function, in order to compute the decayed learning rate. You may simply pass a TensorFlow variable that you increment at each training step.

The decayed value is computed as follows:

cosineDecay = 0.5 * (1 + cos(pi * min(step, cycleSteps) / cycleSteps))
decayed = value * ((1 - alpha) * cosineDecay + alpha)
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CosineDecay
  2. Schedule
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CosineDecay(cycleSteps: Int, alpha: Float = 0.0f, startStep: Long = 0L, name: String = "CosineDecay")

    Permalink

    cycleSteps

    Cosine decay cycle in terms of number of steps.

    alpha

    Minimum decayed learning rate value as a fraction of the original learning rate value.

    startStep

    Step after which to start decaying the learning rate.

    Attributes
    protected

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. def >>(other: Schedule): ComposedSchedule

    Permalink

    Composes the provided other schedule with this schedule and returns the resulting schedule.

    Composes the provided other schedule with this schedule and returns the resulting schedule.

    Definition Classes
    Schedule
  5. val alpha: Float

    Permalink

    Minimum decayed learning rate value as a fraction of the original learning rate value.

  6. def apply(value: Output, step: Option[variables.Variable]): Output

    Permalink

    Applies the decay method to value, the current iteration in the optimization loop is step and returns the result.

    Applies the decay method to value, the current iteration in the optimization loop is step and returns the result.

    value

    Value to decay.

    step

    Option containing current iteration in the optimization loop, if one has been provided.

    returns

    Decayed value.

    Definition Classes
    CosineDecaySchedule
    Annotations
    @throws( ... )
    Exceptions thrown

    IllegalArgumentException If the decay method requires a value for step but the provided option is empty.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def compose(other: Schedule): ComposedSchedule

    Permalink

    Composes this schedule with the provided, other schedule and returns the resulting schedule.

    Composes this schedule with the provided, other schedule and returns the resulting schedule.

    Definition Classes
    Schedule
  10. val cycleSteps: Int

    Permalink

    Cosine decay cycle in terms of number of steps.

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  17. val name: String

    Permalink
  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. val startStep: Long

    Permalink

    Step after which to start decaying the learning rate.

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Schedule

Inherited from AnyRef

Inherited from Any

Ungrouped