Hi Fancy!



 fancy:

My machine has 16 GB and runs out of memory instantly!


I can reproduce this on a 32 GB ubuntu machine by doubling the size
of data:
data = torch.rand(60000000)

>>> import torch
>>> torch.__version__
'1.10.0'
>>> data = torch.rand(60000000)
>>> for item in data:
...     pass
...
Killed

Python 3.8.3 (default, May 19 2020, 18:47:26)

top shows memory (%MEM) increasing up to 100% before the python
process is killed.  This happens after a little more than half a minute.
Note, this does not happen with a numpy array:
data = np.random.rand (60000000)

(In this case the loop takes a few seconds to complete.)
Best.
K. Frank