tf.keras.optimizers.schedules.ExponentialDecay
Stay organized with collections
Save and categorize content based on your preferences.
A LearningRateSchedule that uses an exponential decay schedule.
Inherits From: LearningRateSchedule
tf.keras.optimizers.schedules.ExponentialDecay(
initial_learning_rate, decay_steps, decay_rate, staircase=False, name=None
)
Args |
initial_learning_rate
|
A scalar float32 or float64 Tensor or a
Python number. The initial learning rate.
|
decay_steps
|
A scalar int32 or int64 Tensor or a Python number.
Must be positive. See the decay computation above.
|
decay_rate
|
A scalar float32 or float64 Tensor or a
Python number. The decay rate.
|
staircase
|
Boolean. If True decay the learning rate at discrete
intervals
|
name
|
String. Optional name of the operation. Defaults to
'ExponentialDecay'.
|
Methods
from_config
View source
@classmethod
from_config(
config
)
Instantiates a LearningRateSchedule
from its config.
Args |
config
|
Output of get_config() .
|
Returns |
A LearningRateSchedule instance.
|
get_config
View source
get_config()
__call__
View source
__call__(
step
)
Call self as a function.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.keras.optimizers.schedules.ExponentialDecay\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 2 version](/api_docs/python/tf/keras/optimizers/schedules/ExponentialDecay) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py#L64-L164) |\n\nA LearningRateSchedule that uses an exponential decay schedule.\n\nInherits From: [`LearningRateSchedule`](../../../../tf/keras/optimizers/schedules/LearningRateSchedule)\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.keras.optimizers.schedules.ExponentialDecay`](/api_docs/python/tf/keras/optimizers/schedules/ExponentialDecay), \\`tf.compat.v2.keras.optimizers.schedules.ExponentialDecay\\`, \\`tf.compat.v2.optimizers.schedules.ExponentialDecay\\`\n\n\u003cbr /\u003e\n\n tf.keras.optimizers.schedules.ExponentialDecay(\n initial_learning_rate, decay_steps, decay_rate, staircase=False, name=None\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------------------|-------------------------------------------------------------------------------------------------------------|\n| `initial_learning_rate` | A scalar `float32` or `float64` `Tensor` or a Python number. The initial learning rate. |\n| `decay_steps` | A scalar `int32` or `int64` `Tensor` or a Python number. Must be positive. See the decay computation above. |\n| `decay_rate` | A scalar `float32` or `float64` `Tensor` or a Python number. The decay rate. |\n| `staircase` | Boolean. If `True` decay the learning rate at discrete intervals |\n| `name` | String. Optional name of the operation. Defaults to 'ExponentialDecay'. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `from_config`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py#L50-L60) \n\n @classmethod\n from_config(\n config\n )\n\nInstantiates a `LearningRateSchedule` from its config.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|----------|---------------------------|\n| `config` | Output of `get_config()`. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| A `LearningRateSchedule` instance. ||\n\n\u003cbr /\u003e\n\n### `get_config`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py#L157-L164) \n\n get_config()\n\n### `__call__`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py#L142-L155) \n\n __call__(\n step\n )\n\nCall self as a function."]]