gswycf / Joint-Extraction-of-Entities-and-Relations-Based-on-a-Novel-Tagging-Scheme

Joint Extraction of Entities and Relations Based on cnn+rnn
MIT License
185 stars 54 forks source link

i have already download your update in Google.drive, but when i run train.py ,there are sone errors in model.py,in “def forward” ,char_output 's dimensions is wrong #4

Open z786760876 opened 5 years ago

wangbq18 commented 5 years ago

I have the same problem. do you resove it?

sxrczh commented 5 years ago

When I run train.py ,there are some errors in model.py,in “def forward” ,char_output 's dimensions is wrong

ziyanwang commented 3 years ago

In model.py,in “def forward” You can add contiguous() to change the code to: char_output = self.char_encoder(char_input.contiguous().view(-1, char_input.size(2))).view(batch_size, seq_len, -1)