daniel-kukiela / nmt-chatbot

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

AttributeError: module 'tensorflow._api.v2.nn' has no attribute 'rnn_cel #167

Open jalakamkiran opened 3 years ago

jalakamkiran commented 3 years ago

Getting a attribute error like this Traceback (most recent call last): File "C:\Users\Inspired Kinematics\Desktop\nmt-chatbot\train.py", line 7, in <module> from nmt import nmt File "C:\Users\Inspired Kinematics\Desktop\nmt-chatbot/nmt\nmt\nmt.py", line 28, in <module> from . import inference File "C:\Users\Inspired Kinematics\Desktop\nmt-chatbot/nmt\nmt\inference.py", line 25, in <module> from . import gnmt_model File "C:\Users\Inspired Kinematics\Desktop\nmt-chatbot/nmt\nmt\gnmt_model.py", line 210, in <module> class GNMTAttentionMultiCell(tf.nn.rnn_cell.MultiRNNCell): AttributeError: module 'tensorflow._api.v2.nn' has no attribute 'rnn_cell'

Guessing it is a error due to version. Any workaround please?

ashraq1455 commented 3 years ago

This error seems to be related to tensorflow version. Make sure you install the tensorflow version as in requirements.txt.

Nathan-Chell commented 3 years ago

I do believe you have installed tensorflow 2.x. This chatbot was written to use Tensorflow 1.12 And above, but importantly below Tensorflow 2.x. To fix this simply pip install tesnorflow-gpu==1.15.4

dusty-dusty commented 3 years ago

https://github.com/daniel-kukiela/nmt-chatbot/issues/143