Hello,
I was wondering whether something like numpy.memmap exists in PyTorch? Or should I just save as a numpy array and use numpy.memmap instead, because conversion to torch tensors is cheap?
numpy.memmap
Numpy: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.memmap.html
You can use torch.Storage.from_file (docs):
torch.Storage.from_file
e.g.
x = torch.IntTensor(torch.IntStorage.from_file('file.bin', size=100))
Is there a way to store the data to memory mapped files as well. Does Pytorch have a method for this?