vegardde:

conda install -c peterjc123 pytorch-cpu


I removed and reinstalled. I also manually edited the numpy config file, to only include the conda version. (The intel directory did not exist anyhow) However, that didnt fix the the issue. The script still crashes when calculating the loss in the second iteration:
loss = criterion(pred[:, :-future], test_target)