Getting the following error. How do I find out which tensor autograd is complaining about ?
torch/autograd/init.py", line 251, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: tensor does not have a device
That is lot of extra work and time. PyTorch autograd should have , and if not need to add additional logging. Is there any debug/trace capability in autograd ? To me, not reporting the tensor looks like a bug in autograd.
Here are few tricks that helped me figure out the issue. It is often not possible to create a small reproducer, hence debugging/tracing logs are invaluable tools.