# tf_agents.keras_layers.permanent_variable_rate_dropout.PermanentVariableRateDropout

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/keras_layers/permanent_variable_rate_dropout.py#L25-L61) |

Applies dropout both in training and serving, with variable dropout rate.

    tf_agents.keras_layers.permanent_variable_rate_dropout.PermanentVariableRateDropout(
        rate, permanent=False, **kwargs
    )

Initialize this layer the same was as [`keras.layers.Dropout`](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Dropout), with two notable
differences:
--The parameter `rate` can also be a callable.
--The extra boolean parameter `permanent`. If set to true, dropout will be
applied both in training and inference.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `seed` | optional integer, used to create RandomGenerator. |
| `force_generator` | boolean, default to False, whether to force the RandomGenerator to use the code branch of tf.random.Generator. |
| `rng_type` | string, the rng type that will be passed to backend RandomGenerator. `None` will allow RandomGenerator to choose types by itself. Valid values are "stateful", "stateless", "legacy_stateful". Defaults to `None`. |
| `**kwargs` | other keyword arguments that will be passed to the parent \*class |

<br />