Trying to export a text generation model with torch.onnx and am getting an error when running
torch.onnx.export(model, Variable(torch.LongTensor([[1]])),  "test.onx", verbose=True)
RuntimeError: /pytorch/torch/csrc/jit/tracer.h:116: getTracingState: Assertion `var_state == state` failed.

This is what my model looks like:
SequentialRNN(
  (0): RNN_Encoder(
    (encoder): Embedding(16709, 500, padding_idx=1)
    (encoder_with_dropout): EmbeddingDropout(
      (embed): Embedding(16709, 500, padding_idx=1)
    )
    (rnns): ModuleList(
      (0): WeightDrop(
        (module): LSTM(500, 500, dropout=0.1)
      )
      (1): WeightDrop(
        (module): LSTM(500, 500, dropout=0.1)
      )
      (2): WeightDrop(
        (module): LSTM(500, 500, dropout=0.1)
      )
    )
    (dropouti): LockedDropout(
    )
    (dropouth): LockedDropout(
    )
  )
  (1): LinearDecoder(
    (decoder): Linear(in_features=500, out_features=16709, bias=True)
    (dropout): LockedDropout(
    )
  )
)

I have built pytorch from commit 6185b27c 11. How do I go about debugging this issue?