zepingyu0512/sli_rec

run error in train.py

nicole-chen opened this issue · 0 comments

  • In utils.py
    from tensorflow.python.ops.rnn_cell_impl import _Linear
    Error: no module named _Linear
    maybe from rnn_cell_impl import _Linear
    from keras import backend as K
    keras is never called here

  • In rnn.py
    _like_rnncell = rnn_cell_impl._like_rnncell
    AttributeError: 'module' object has no attribute '_like_rnncell'
    one has to add import rnn_cell_impl at the beginning of rnn.py

  • In rnn_cell_impl.py
    if context.in_graph_mode():
    if your tensorflow is >= 1.12.0 it may raise error:
    AttributeError: 'module' object has no attribute 'in_graph_mode'

#if context.in_graph_mode():
if not context.executing_eagerly():

would work