bi-att-flow icon indicating copy to clipboard operation
bi-att-flow copied to clipboard

ImportError: cannot import name '_linear'

Open dsli208 opened this issue 2 years ago • 2 comments

I'm getting this error when trying to train given the instructions in the README

dsli208 avatar Sep 17 '21 13:09 dsli208

Same here. Were you able to find a solution?

javinator48 avatar Dec 11 '21 00:12 javinator48

Make the following changes to the code:

  1. In nn.py in my/tensorflow add, replace
  • from tensorflow.python.ops.rnn_cell import _linear with
  • from tensorflow.python.ops import rnn_cell_impl
  1. In same file, change _linear to rnn_cell_impl._linear
  2. In rnn.py, change
  • from tensorflow.python.ops.rnn import bidirectional_rnn as _bidirectional_rnn to
  • from tensorflow.python.ops.rnn import static_bidirectional_rnn as _bidirectional_rnn

saptarshi059 avatar Jun 08 '22 23:06 saptarshi059