tf.keras.optimizers.schedules.PolynomialDecay
Stay organized with collections
Save and categorize content based on your preferences.
A LearningRateSchedule that uses a polynomial decay schedule.
Inherits From: LearningRateSchedule
tf.keras.optimizers.schedules.PolynomialDecay(
initial_learning_rate, decay_steps, end_learning_rate=0.0001, power=1.0,
cycle=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.
|
end_learning_rate
|
A scalar float32 or float64 Tensor or a
Python number. The minimal end learning rate.
|
power
|
A scalar float32 or float64 Tensor or a
Python number. The power of the polynomial. Defaults to linear, 1.0.
|
cycle
|
A boolean, whether or not it should cycle beyond decay_steps.
|
name
|
String. Optional name of the operation. Defaults to
'PolynomialDecay'.
|
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.PolynomialDecay\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [TensorFlow 2 version](/api_docs/python/tf/keras/optimizers/schedules/PolynomialDecay) | [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py#L267-L406) |\n\nA LearningRateSchedule that uses a polynomial 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.PolynomialDecay`](/api_docs/python/tf/keras/optimizers/schedules/PolynomialDecay), \\`tf.compat.v2.keras.optimizers.schedules.PolynomialDecay\\`, \\`tf.compat.v2.optimizers.schedules.PolynomialDecay\\`\n\n\u003cbr /\u003e\n\n tf.keras.optimizers.schedules.PolynomialDecay(\n initial_learning_rate, decay_steps, end_learning_rate=0.0001, power=1.0,\n cycle=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| `end_learning_rate` | A scalar `float32` or `float64` `Tensor` or a Python number. The minimal end learning rate. |\n| `power` | A scalar `float32` or `float64` `Tensor` or a Python number. The power of the polynomial. Defaults to linear, 1.0. |\n| `cycle` | A boolean, whether or not it should cycle beyond decay_steps. |\n| `name` | String. Optional name of the operation. Defaults to 'PolynomialDecay'. |\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#L398-L406) \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#L369-L396) \n\n __call__(\n step\n )\n\nCall self as a function."]]