torch.rand_like
function rand_like<S extends Shape>(input: Tensor<S>, options: RandomLikeOptions = {}): Tensor<S>Create a tensor with same shape as input filled with uniform random values.
Parameters
inputTensor<S>- Tensor to match shape from
optionsRandomLikeOptionsoptional- Optional settings for random_like
Returns
Tensor<S>– A new tensor with uniform random values in [0, 1)