nlpir2020 / MIE-ACL-2020

code&data for MIE: A Medical Information Extractor towards Medical Dialogues, ACL 2020
51 stars 11 forks source link

the version of tensorflow #1

Open lonelydancer opened 4 years ago

lonelydancer commented 4 years ago

I install tensorflow-1.14.0 ,python3. Here is the error. tensorflow.python.framework.errors_impl.InvalidArgumentError: seq_lens(30) > input.dims(1) [[{{node utt_encoder_4/zhuangtai/bidirectional_rnn/bw/ReverseSequence}}]]

YuNFAnz06 commented 4 years ago

I install tensorflow-1.14.0 ,python3. Here is the error. tensorflow.python.framework.errors_impl.InvalidArgumentError: seq_lens(30) > input.dims(1) [[{{node utt_encoder_4/zhuangtai/bidirectional_rnn/bw/ReverseSequence}}]]

me too. How did you solve it?

FlyingCat-fa commented 4 years ago

The bug is not from the version of tf. We should change line 322 in utils.py from: window_utts_len = [len(utt) for utt in window_utts] to : window_utts_len = [len(utt) if len(utt) < self.max_len else self.max_len for utt in window_utts]

The bug will be solved !

The reason: The utts length has set the max_len, however the window_utts_len is the true length, when the true lenght is bigger than max_len, there will be a error !

lizhenping commented 3 years ago

i used tensorflow-gpu==1.15,everything is all right ,cuda = 10.0,mark it !

frankdarkluo commented 3 years ago

i used tensorflow-gpu==1.15,everything is all right ,cuda = 10.0,mark it !

Hi, do you reproduce a better result than 69.28 (MIE-multi, dialog-level, full) mentioned in the paper? I can only get a point around 68.

NeverMore2020 commented 2 years ago

The bug is not from the version of tf. We should change line 322 in utils.py from: window_utts_len = [len(utt) for utt in window_utts] to : window_utts_len = [len(utt) if len(utt) < self.max_len else self.max_len for utt in window_utts]

The bug will be solved !

The reason: The utts length has set the max_len, however the window_utts_len is the true length, when the true lenght is bigger than max_len, there will be a error !

This works! Many thanks for pointing it out!