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
Is transformers LayoutLM really working? #276
Comments
@shaonanqinghuaizongshishi please provide detailed information |
/pytorch/aten/src/THC/THCTensorIndex.cu:361: void indexSelectLargeIndex(TensorInfo<T, IndexType>, TensorInfo<T, IndexType>, TensorInfo<long, IndexType>, int, int, IndexType, IndexType, long) [with T = float, IndexType = unsigned int, DstDim = 2, SrcDim = 2, IdxDim = -2, IndexIsMajor = true]: block: [73,0,0], thread: [64,0,0] Assertion |
keep getting the above error, did not find anything wrong from num_class. |
which command did you run? |
I am using transformers.LayoutLMForTokenClassification.from_pretrained('~') for the model, then run 'model(input_ids, bbox, attention_mask, labels)' for training, and the error came from this line of code. If this was what you ask. |
can you run your code like this: |
|
I tried CUDA_LAUNCH_BLOCKING=1 python your_script.py, and I got the above error. Still can not figure out what's wrong. |
Still not clear about the issue, |
I found the bug after converting the model to CPU, it was some negative width causing the w_position_embeddings to fail. |
Btw, can I change the word_embeddings to make the model work for Chinese? Is that gonna work? |
please refer to #236 |
Getting endless erros when trying to use the LayoutLMForTokenClassification from transformers for NER task, is just me doing wrong or the function still on work?
Really appreciate if you can give some information.
The text was updated successfully, but these errors were encountered: