Hello!
I’ve stumbled on a RuntimeError during the backward pass of my model. It looks like a bug in autograd, since the forward pass works alright and I did not override any .backward(). Here are the relevant bits of the stack trace:
Traceback (most recent call last):
...
  File "/home/carl/projets/smallnet/trainable.py", line 182, in train_epoch
    loss.backward()
  File "/home/carl/vpriv/lib/python3.5/site-packages/torch/autograd/variable.py", line 156, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)
  File "/home/carl/vpriv/lib/python3.5/site-packages/torch/autograd/__init__.py", line 98, in backward
    variables, grad_variables, retain_graph)
RuntimeError: invalid argument 3: sizes do not match at /pytorch/torch/lib/THC/generated/../generic/THCTensorMathPointwise.cu:217

Are you aware of common pitfalls that can trigger that kind of error?
It seems I cannot debug the backward pass; it’s computed with the C library.
Thanks a lot!