BayesianDropout2d#
- class torchbayesian.bnn.BayesianDropout2d(p: float = 0.5, inplace: bool = False)#
Bases:
_DropoutNdThis class is an implementation of ‘torch.nn.Dropout2d’ that remains active in eval mode.
This is used for Bayesian neural networks (BNN) via Monte Carlo dropout (MCD).
Parameters#
- pfloat
The probability of an element to be zeroed. Defaults to 0.5.
- inplacebool
If set to ‘True’, will do this operation in-place. Defaults to ‘False’.