mindspore.nn.probability

Probability.

The high-level components used to construct the probabilistic network.

Bayesian Layers

API Name

Description

Supported Platforms

mindspore.nn.probability.bnn_layers.ConvReparam

Convolutional variational layers with Reparameterization.

Ascend GPU

mindspore.nn.probability.bnn_layers.DenseLocalReparam

Dense variational layers with Local Reparameterization.

Ascend GPU

mindspore.nn.probability.bnn_layers.DenseReparam

Dense variational layers with Reparameterization.

Ascend GPU

Prior and Posterior Distributions

API Name

Description

Supported Platforms

mindspore.nn.probability.bnn_layers.NormalPosterior

Build Normal distributions with trainable parameters.

Ascend GPU

mindspore.nn.probability.bnn_layers.NormalPrior

To initialize a normal distribution of mean 0 and standard deviation 0.1.

Ascend GPU

Bayesian Wrapper Functions

API Name

Description

Supported Platforms

mindspore.nn.probability.bnn_layers.WithBNNLossCell

Generate a suitable WithLossCell for BNN to wrap the bayesian network with loss function.

Ascend GPU