daniel-kukiela / nmt-chatbot

NMT Chatbot
GNU General Public License v3.0
387 stars 214 forks source link

AttributeError: module 'tensorflow_core._api.v2.nn' has no attribute 'rnn_cell' #143

Closed dusty-dusty closed 4 years ago

dusty-dusty commented 4 years ago

Python 3.7.4 tensorflow 2.0.0

Traceback (most recent call last): File "train.py", line 8, in from nmt import nmt File "D:\Coding\aichatbot\nmt-chatbot-master/nmt\nmt\nmt.py", line 28, in from . import inference File "D:\Coding\aichatbot\nmt-chatbot-master/nmt\nmt\inference.py", line 25, in from . import gnmt_model File "D:\Coding\aichatbot\nmt-chatbot-master/nmt\nmt\gnmt_model.py", line 261, in class GNMTAttentionMultiCell(tf.nn.rnn_cell.MultiRNNCell): AttributeError: module 'tensorflow_core._api.v2.nn' has no attribute 'rnn_cell'

dusty-dusty commented 4 years ago

pip install tensorflow-gpu==1.14

solves the issue dont use v2

also you will need to download numpy v (1.16.4)

nora-illanes commented 4 years ago

pip install tensorflow-gpu==1.14

I have the same problem, and it didnt solve it. Im working with tensorflow 2.0 but the code is written in tensorflow 1.7. To rewrite the code is unrealistic. I use v1. compatible for all variables, but I have problems with this issue. How to make it compatible?