torch.Tensor.random_
- Tensor.random_(from=0, to=None, *, generator=None) → Tensor
Fills
selftensor with numbers sampled from the discrete uniform distribution over. If not specified, the values are usually only bounded by tensor’s data type. However, for floating point types, if unspecified, range will be to ensure that every value is representable. For example, will be uniform in .