MindSpore Probability Python API

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

Deep Probability Networks

API Name

Description

Supported Platforms

mindspore.nn.probability.dpn.ConditionalVAE

Conditional Variational Auto-Encoder (CVAE).

Ascend GPU

mindspore.nn.probability.dpn.VAE

Variational Auto-Encoder (VAE).

Ascend GPU

Infer

API Name

Description

Supported Platforms

mindspore.nn.probability.infer.ELBO

The Evidence Lower Bound (ELBO).

Ascend GPU

mindspore.nn.probability.infer.SVI

Stochastic Variational Inference(SVI).

Ascend GPU

ToolBox

API Name

Description

Supported Platforms

mindspore.nn.probability.toolbox.UncertaintyEvaluation

Toolbox for Uncertainty Evaluation.

Ascend GPU

mindspore.nn.probability.toolbox.VAEAnomalyDetection

Toolbox for anomaly detection by using VAE.

Ascend GPU

Model Transformer

API Name

Description

Supported Platforms

mindspore.nn.probability.transforms.TransformToBNN

Transform Deep Neural Network (DNN) model to Bayesian Neural Network (BNN) model.

Ascend GPU