bi-att-flow
bi-att-flow copied to clipboard
cannot import name _linear in nn.py
This import error shows up when I try to train.
from tensorflow.python.ops import rnn_cell_impl
_linear = rnn_cell_impl._linear # pylint: disable=invalid-name, protected-access
@lovecambi 's solution didn't work for me, however got it to run and created a pull request to the dev branch https://github.com/allenai/bi-att-flow/pull/89
@klintan 's solution seems work but need additional tweak. You need make following changes in basic/model.py: tf.concat(0, [word_emb_mat, self.new_emb_mat]) -> tf.concat([word_emb_mat, self.new_emb_mat], 0) Update all other concat functions as well.
You can run this branch for the newer version of tensorflow (all errors have been fixed): https://github.com/Vimos/bi-att-flow/tree/tf1.8