torch.randint_like — PyTorch 2.7 documentation (original) (raw)

torch.randint_like(input, low=0, high, \*, dtype=None, layout=torch.strided, device=None, requires_grad=False, memory_format=torch.preserve_format) → Tensor

Returns a tensor with the same shape as Tensor input filled with random integers generated uniformly between low (inclusive) andhigh (exclusive).

Parameters

Keyword Arguments