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’.

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,)