mindspore.nn.probability.bijector.Exp

class mindspore.nn.probability.bijector.Exp(name='Exp')[source]

Exponential Bijector. This Bijector performs the operation:

\[Y = \exp(x).\]
Parameters

name (str) – The name of the Bijector. Default: ‘Exp’.

Inputs and Outputs of APIs:

The accessible apis of the Exp bijector are defined in the base class, including:

  • forward

  • inverse

  • forward_log_jacobian

  • backward_log_jacobian

It should be notice that the inputs to the APIs of the Exp bijector should be always a tensor. For more details of all APIs, including the inputs and outputs of the APIs of the Exp bijector, please refer to mindspore.nn.probability.bijector.Bijector, and examples below.

Supported Platforms:

Ascend GPU

Examples

>>> import mindspore
>>> import mindspore.nn as nn
>>> from mindspore import Tensor
>>>
>>> # To initialize an Exp bijector.
>>> exp_bijector = nn.probability.bijector.Exp()
>>> value = Tensor([1, 2, 3], dtype=mindspore.float32)
>>> ans1 = exp_bijector.forward(value)
>>> print(ans1.shape)
(3,)
>>> ans2 = exp_bijector.inverse(value)
>>> print(ans2.shape)
(3,)
>>> ans3 = exp_bijector.forward_log_jacobian(value)
>>> print(ans3.shape)
(3,)
>>> ans4 = exp_bijector.inverse_log_jacobian(value)
>>> print(ans4.shape)
(3,)
extend_repr()[source]

Display instance object as string.