tf_agents.networks.utils.maybe_permanent_dropout

View source on GitHub

Adds a Keras dropout layer with the option of applying it at inference.

rate the probability of dropping an input.
noise_shape 1D integer tensor representing the dropout mask multiplied to the input.
seed A Python integer to use as random seed.
permanent If set, applies dropout during inference and not only during training. This flag is used for approximated Bayesian inference.

A function adding a dropout layer according to the parameters for the given input.