nlc icon indicating copy to clipboard operation
nlc copied to clipboard

Which TF version to use?

Open mojesty opened this issue 6 years ago • 1 comments

I tried to launch this project vie TF 1.8, but found that rnn_cell._linear attribute is unavailable. So i googled until found the advice to replace this class method with tf.contrib.fully_connected layer. Then the next problem arose: how to transform arguments, because fully_connected layer has 14 and there are 4 args w/o keywirds in the code. I think i succeeded in it, however, I was not able to map the last argument from phi_hs2d = tanh(rnn_cell._linear(hs2d, num_units, True, 1.0)) to any argument in fully_connected init. I suppose that True in the line above means trainable=True

Next problem is the shape mismatch: ValueError: Shapes must be equal rank, but are 2 and 3 for 'NLC/Decoder/DecoderAttnCell/DecoderAttnCell/while/Select' (op: 'Select') with input shapes: [?], [?,400], [2,?,400]. in nlc_model.py:166, so probably the model either can't be ported straightforwardly to the newest version of TF or has the size mismatch error inside it.

Could you help, e. g. provide complete environment where the model can be trained?

mojesty avatar May 27 '18 07:05 mojesty

It worked for me with TF 0.12. Please try with it.

surya-kanoria avatar Jun 29 '18 18:06 surya-kanoria