connormeaton / Hierarchical_BiLSTM-CRF_Encoder

0 stars 1 forks source link

Some questions about this code #1

Open yuhengqi opened 3 years ago

yuhengqi commented 3 years ago

Excuse me. Recently I've been working on the topic of dialogue act recognition. So I want to find a piece of code for reference. Thank you very much for sharing this source code. But I ran this code with the following problem.

Traceback (most recent call last): File "D:\Tencent\anaconda3\envs\tensorflow2\lib\site-packages\tensorflow_core\python\client\session.py", line 1365, in _do_call return fn(*args) File "D:\Tencent\anaconda3\envs\tensorflow2\lib\site-packages\tensorflow_core\python\client\session.py", line 1350, in _run_fn target_list, run_metadata) File "D:\Tencent\anaconda3\envs\tensorflow2\lib\site-packages\tensorflow_core\python\client\session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: Incompatible shapes: [2,159] vs. [2,149] [[{{node loss/cond/add_1}}]] [[viterbi_decode/cond/rnn_1/while/GatherNd/_537]] (1) Invalid argument: Incompatible shapes: [2,159] vs. [2,149] [[{{node loss/cond/add_1}}]] 0 successful operations. 0 derived errors ignored.

Could you help me? Thank you.

connormeaton commented 3 years ago

Hello. As a heads up, the code doesn't run perfectly. This is just a side project I haven't had much time to get back to. However, the first thing I'm noticing in your traceback is that you're using tensorflow 2. The code is written with tensorflow 1.15.0. Try changing your version.