yubochen / NBTNGMA4ED

49 stars 16 forks source link

lstm decoder : dimension must be equal #2

Open DorianKodelja opened 5 years ago

DorianKodelja commented 5 years ago

If i'm using tensorflow-gpu 1.8.0, the other issue I raised (concerning AUTO_REUSE) doesn't appear. Yet I have another error in lstm_decoder(): ValueError: Dimensions must be equal, but are 740 and 640 for 'LSTMD/basic_lstm_cell/MatMul' (op: 'MatMul') with input shapes: [?,740], [640,400].

It occurs at
(cell_output, (c_state, h_state)) = lstm_cell(lstm_outputs[:, time_step, :], (c_state, h_state)) because it's expecting h_state to be of dimension (?,100) but it is in fact of dimension (?,200) because of the concatenation with the previous prediction at the preceding line h_state = tf.concat([h_state, tag_pre], -1) # (?, 200)

ponnyhdworker commented 5 years ago

Thanks for your awesome work. I read the paper carefully, but I don't know how to solve this problem based on the TLSTM1 formulas, can you give me a solution?

lc-bitsec commented 5 years ago

use tensorflow==1.4.0 can solve this problom

AshleyCry commented 3 years ago

Just delete the CKPT folder

Yyy11181 commented 1 year ago

this problem occor.How should I do?? W tensorflow/core/framework/op_kernel.cc:1502] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key LSTMD2/basic_lstm_cell/bias not found in checkpoint