nicolas-ivanov / tf_seq2seq_chatbot

[unmaintained]
422 stars 203 forks source link

ModuleNotFoundError: No module named 'tensorflow.models' #25

Open laoma023012 opened 7 years ago

laoma023012 commented 7 years ago

How can I fix this error while running python train.py

Traceback (most recent call last): File "train.py", line 8, in from tf_seq2seq_chatbot.lib.train import train File "/home/laoma/nlp_Hujiang/tf_seq2seq_chatbot/tf_seq2seq_chatbot/lib/train.py", line 14, in from tf_seq2seq_chatbot.lib.seq2seq_model_utils import create_model File "/home/laoma/nlp_Hujiang/tf_seq2seq_chatbot/tf_seq2seq_chatbot/lib/seq2seq_model_utils.py", line 11, in from tf_seq2seq_chatbot.lib import seq2seq_model File "/home/laoma/nlp_Hujiang/tf_seq2seq_chatbot/tf_seq2seq_chatbot/lib/seq2seq_model.py", line 28, in from tensorflow.models.rnn.translate import data_utils ModuleNotFoundError: No module named 'tensorflow.models'

halflkaka commented 6 years ago

Roll back to the version 0.12 by using sudo pip install tensorflow==0.12 and it works. The reason is that for the version 1.x, the reference names have been changed.

saipavanmeruga commented 4 years ago

any suggestions for the changed reference names for tensorflow 2.x

saipavanmeruga commented 4 years ago

there is a data_utils file in repository, import that where ever required, hope it helps