# tf.keras.optimizers.schedules.PolynomialDecay

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/schedules/PolynomialDecay) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py#L267-L406) |

A LearningRateSchedule that uses a polynomial decay schedule.

Inherits From: [`LearningRateSchedule`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/optimizers/schedules/LearningRateSchedule)

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.keras.optimizers.schedules.PolynomialDecay`](https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/schedules/PolynomialDecay), \`tf.compat.v2.keras.optimizers.schedules.PolynomialDecay\`, \`tf.compat.v2.optimizers.schedules.PolynomialDecay\`

<br />

    tf.keras.optimizers.schedules.PolynomialDecay(
        initial_learning_rate, decay_steps, end_learning_rate=0.0001, power=1.0,
        cycle=False, name=None
    )

<br />

<br />

<br />

| ## 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'. |

<br />

## Methods

### `from_config`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py#L50-L60)

    @classmethod
    from_config(
        config
    )

Instantiates a `LearningRateSchedule` from its config.

<br />

<br />

<br />

| Args ||
|---|---|
| `config` | Output of `get_config()`. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| A `LearningRateSchedule` instance. ||

<br />

### `get_config`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py#L398-L406)

    get_config()

### `__call__`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/keras/optimizer_v2/learning_rate_schedule.py#L369-L396)

    __call__(
        step
    )

Call self as a function.