exponential_¶
- paddle.Tensor. exponential_ ( x, lam=1.0, name=None )
-
This inplace OP fill input Tensor
x
with random number from a Exponential Distribution.lam
is \(\lambda\) parameter of Exponential Distribution.\[f(x) = \lambda e^{-\lambda x}\]- Parameters
-
x (Tensor) – Input tensor. The data type should be float32, float64.
lam (float, optional) – \(\lambda\) parameter of Exponential Distribution. Default, 1.0.
name (str, optional) – The default value is None. Normally there is no need for user to set this property. For more information, please refer to Name.
- Returns
-
Input Tensor
x
. - Return type
-
Tensor
Examples
import paddle paddle.set_device('cpu') paddle.seed(100) x = paddle.empty([2,3]) x.exponential_() # [[0.80643415, 0.23211166, 0.01169797], # [0.72520673, 0.45208144, 0.30234432]]