wenwenyu / PICK-pytorch

Code for the paper "PICK: Processing Key Information Extraction from Documents using Improved Graph Learning-Convolutional Networks" (ICPR 2020)
https://arxiv.org/abs/2004.07464
MIT License
556 stars 193 forks source link

It seems that x_gcn and new_x are not combined properly in UnionLayer #27

Closed bravelywangexocr closed 3 years ago

bravelywangexocr commented 4 years ago

Hi wenwenyu,

It appears that the padding in the T dimension is not considered for x_gcn before adding with new_x.

https://github.com/wenwenyu/PICK-pytorch/blob/593c2644040da71bd04e6a9029c01464a5b83a8c/model/decoder.py#L171

Can you help confirm this?

Thanks

wenwenyu commented 4 years ago

Hi,

Thanks for your mention. I have checked it again and the way of combining x_gcn and new_x is not error or typos. We want to use x_gcn to aid new_x in the BiLSTM layer at every time step (T dimension). In the beginning, we tried to use x_gcn as the initial hidden state of BiLSTM instead of combining x_gcn with new_x at every time step. but the performance hasn't improved. This way of the combine can improve performance.

wenwenyu commented 3 years ago

I will close this issue. Please feel free to reopen or create a new one if you have more questions.