Open juvebogdan opened 3 years ago
Can someone able to resolve this issue please.
Seems like you can only use it for shorter n-grams. It was like that for me. When I increased n-grams training took forever, It's not really usable for bigger n-grams. That's not the way to approach this
how can i recognite field value on multiple line? can you suggest any solution?
This is a limitation of the architecture I'm currently using. Increasing the n-gram size (which is currently 4) increases the model size exponentially and unless you have massive GPU resources available, that's not a viable option. The n-gram size decides the maximum number of words that you can extract for a particular field which is currently limited to 4. N-grams are currently extracted line-by-line which means multiple line entities cannot be extracted right now.
I'd suggest going through the paper for some insight into these limitations. I'm working on a new architecture to resolve some of these problems.
Out of curiosity...what would I have to change to increase the number of extracted n-grams? I have quite a lot of GPU resources available and would like to give it a try.
There are two places you'd have to change the n-gram length:
Thanks for your quick response! I tried to set it to 6, but it gave me the following error message:
" ValueError: Tensor's shape (3, 3, 128, 4) is not compatible with supplied shape (3, 3, 128, 6) "
Do you have any idea how to modify the tensor shape? This might be due to the model I guess...
Firstly, can you pull in the latest commit? It fixes a couple of bugs I missed when n-gram length is different. Secondly, you need to prepare your data again after you make the changes I mentioned above and then train your model. I tried it with different n-gram lengths, everything seems to work. Let me know if you face any more issues.
I pulled the latest commit and also prepared the data again. Now it shows me a slightly different error message:
" ValueError: Tensor's shape (3, 3, 110, 32) is not compatible with supplied shape (3, 3, 118, 32) "
It seems to have a problem with the tensors width or am I wrong? Appreciate your support!
I guess I found the source of the error message. I will most likely occur if you want to restart at a checkpoint with the previous size that obviously can't be matched. Seems to make sense. Appreciate your support tho!
@naiveHobo I have set different n_grams (e.g 8) but when I run prediction is extracting still maximum 4 n_grams(words). Do we need to change anything else somewhere or it's part of paper limitations?
Hello,
I have this issue where if field of interest is longer. For example has 5, 6 or even more words it only extracts first part. Can you advise what can I do to fix this? Is n-gram setting here something I can try?