PyTorch 0.1.12_1 is one of the earliest releases, so I would strongly recommend to update to the latest stable release (1.5.1).
In 0.1.12, you had to pass a function to map_location via:
torch.load(..., map_location=lambda storage, location: 'cpu')