I’m sorry, my bad. This should work:
torch.load('my_file.pt', map_location=lambda storage, loc: storage)