New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error When Following the Usage Instructions #27
Comments
Have a look here: https://github.com/uakarsh/docformer/blob/master/examples/DocFormer_for_MLM.ipynb The error is because, the entity is not batched (i.e having a shape of (....), rather than (batch_size,....) |
@uakarsh Thank you for your help! Does this mean that the Usage section of the README can't actually be used? I was trying to do a demo of it to my study group. I tried |
It can be used, we just need to pass an argument, |
The thing, which you did also won't work, because there are more than just image features, i.e you need to unsqueeze the other features as well. I have updated the readme, hope it helps |
Thank you so much, it runs now! Unsqueezing each feature also works for me, but |
Maybe, you can have a look at the notebook, which I shared previously. In that notebook, you can go through the All the shapes are mentioned as per the default configuration
And then, for downstream task, the linear layers are attached. Hope it helps. |
Ok, understood, thank you very much for your help. I'll close the issue since the example runs! |
I tried following the usage instructions you posted on a sample .jpg image of a receipt.
Every time I run it, I get an error saying, "RuntimeError: Expected 4-dimensional input for 4-dimensional weight [64, 3, 7, 7], but got 3-dimensional input of size [3, 384, 500] instead".
How do I fix that?
Full code:
Full error:
The text was updated successfully, but these errors were encountered: