Thanks tom. It’s not so easy for me to use gdb since I’m on Windows, but I did happen to discover the issue. In my loading code, I had moved the model by calling .to(at::kCUDA) so the tensor needed to be moved too before.