Skip to content

RuntimeError: mat1 dim 1 must match mat2 dim 0  #5

@sathsaraRasantha

Description

@sathsaraRasantha

First of all, you have done a fantastic work here and I would like to thank you for that. I am trying to use your implementation on a different QA dataset ( Translated version of SQuAD 1.0 to Sinhala language ). The only changes I made was using different dataset ( But in same format ), using Google colab and using FastText word embeddings instead of Glove. I am getting a error when trying to call the train function. I didn't make any changes to "class BiDAF" or train function. This is the error I am getting.

Starting training ........
Starting batch: 0

RuntimeError Traceback (most recent call last)
in ()
----> 1 train(model, train_dataset)

9 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py in linear(input, weight, bias)
1690 ret = torch.addmm(bias, input, weight.t())
1691 else:
-> 1692 output = input.matmul(weight.t())
1693 if bias is not None:
1694 output += bias

RuntimeError: mat1 dim 1 must match mat2 dim 0

Can you take a look at this whenever you have a free time. It would be great if you can help me with this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions