I get this error upon calling .step() of a optimizer on my model after backprop:
Traceback (most recent call last):
  File "gru_model_biliear.py", line 259, in <module>
    optimizer.step()
  File "/home/nilabhra/miniconda2/envs/pytorch/lib/python2.7/site-packages/torch/optim/adam.py", line 74, in step
    p.data.addcdiv_(-step_size, exp_avg, denom)
RuntimeError: sizes do not match at /py/conda-bld/pytorch_1493676237139/work/torch/lib/THC/generated/../generic/THCTensorMathPointwise.cu:566

The final layer of the model is a nn.Bilinear layer. The error goes away if I replace it with a nn.Linear layer.
Possible bug in the backward function?