uniform_like¶
dragon.random.
uniform_like
(
inputs,
low=- 1,
high=1,
dtype='float32',
**kwargs
)[source]¶Return a tensor initialized from the uniform distribution with shape as the other.
\[\text{out} \sim \mathcal{U}(\alpha, \beta) \]- Parameters:
- inputs (dragon.Tensor) – The tensor to hint the shape.
- low (number, optional, default=-1) – The value to \(\alpha\).
- high (number, optional, default=1) – The value to \(\beta\).
- dtype (str, optional, default='float32') – The optional data type.
- Returns:
dragon.Tensor – The output tensor.