You can use torch.Storage.from_file
(docs):
e.g.
x = torch.IntTensor(torch.IntStorage.from_file('file.bin', size=100))
You can use torch.Storage.from_file
(docs):
e.g.
x = torch.IntTensor(torch.IntStorage.from_file('file.bin', size=100))