Hi all,
I’m currently working on a project related to diffusion models and I have encountered an issue with the torch.rand()
function. I have noticed that the output of this function only has four decimal places, even when multiplied by certain numbers. I have checked the documentation for this function but I am still confused about why this is happening.
Can anyone offer any insights into this issue? Thanks!
Some examples:
>>> a = torch.rand(1)
>>> print(a)
tensor([0.6181])
>>> a * 0.999
tensor([0.6175])
>>> a * 0.001
tensor([0.0006])
>>> a * 0.0001
tensor([6.1810e-05])
>>> a * 0.9991
tensor([0.6175])
>>> a * 0.99991
tensor([0.6180])