def disable(self) -> DisabledDropout:
    """Returns a disabled version of this layer."""
    return DisabledDropout(
        drop_rate=self.drop_rate,
        share_across_axes=tuple(self.share_across_axes),
    )
Returns a disabled version of this layer.
penzai/deprecated/v1/nn/dropout.py