I get the runtime error “DynamicCUDAInterface::get_device called before CUDA library was loaded” upon trying to call

torch.nn.LSTM(…)

This seems to only happen when I try to do something on a machine without CUDA. However I have the cpu-version of Pytorch installed so I’m not sure why I’m getting this error.