Memory mapped Tensor?

You can use torch.Storage.from_file (docs):

e.g.

x = torch.IntTensor(torch.IntStorage.from_file('file.bin', size=100))
1 Like