log_normal_¶
- paddle. log_normal_ ( x: Tensor, mean: float = 1.0, std: float = 2.0, name: str | None = None ) Tensor [source]
-
This inplace version of api
log_normal
, which returns a Tensor filled with random values sampled from a log normal distribution. The output Tensor will be inplaced with inputx
. Please refer to log_normal.- Parameters
-
x (Tensor) – The input tensor to be filled with random values.
mean (float|int, optional) – Mean of the output tensor, default is 1.0.
std (float|int, optional) – Standard deviation of the output tensor, default is 2.0.
name (str|None, 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
-
Tensor, A Tensor filled with random values sampled from a log normal distribution with the underlying normal distribution’s
mean
andstd
.
Examples
>>> import paddle >>> paddle.seed(200) >>> x = paddle.randn([3, 4]) >>> x.log_normal_() >>> print(x) Tensor(shape=[3, 4], dtype=float32, place=Place(cpu), stop_gradient=True, [[3.99360156 , 0.11746082 , 12.14813519, 4.74383831 ], [0.36592522 , 0.09426476 , 31.81549835, 0.61839998 ], [1.33314908 , 12.31954002, 36.44527435, 1.69572163 ]])