<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/modeling/optimization/lr_schedule.py#L95-L165) |

Linear warmup schedule.

#### View aliases


**Main aliases**

[`tfm.optimization.lr_schedule.LinearWarmup`](https://www.tensorflow.org/api_docs/python/tfm/optimization/LinearWarmup)

<br />

    tfm.optimization.LinearWarmup(
        after_warmup_lr_sched: Union[tf_keras.optimizers.schedules.LearningRateSchedule, float],
        warmup_steps: int,
        warmup_learning_rate: float,
        name: Optional[str] = None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `after_warmup_lr_sched` | tf_keras.optimizers.schedules .LearningRateSchedule or a constant. |
| `warmup_steps` | Number of the warmup steps. |
| `warmup_learning_rate` | Initial learning rate for the warmup. |
| `name` | Optional, name of warmup schedule. |

<br />

## Methods

### `from_config`

    @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/models/blob/v2.20.0/official/modeling/optimization/lr_schedule.py#L152-L165)

    get_config() -> Mapping[str, Any]

### `__call__`

[View source](https://github.com/tensorflow/models/blob/v2.20.0/official/modeling/optimization/lr_schedule.py#L133-L150)

    __call__(
        step: int
    )

Call self as a function.