No module named'tensorflow.models'

I’m working on some work for my first chatbot

from tensorflow.models.rnn.translate import seq2seq_model

I get an error when I try to run a “.py” that contains

Traceback (most recent call last):
   File "translate.py", line 29, in <module>
     from tensorflow.models.rnn.translate import seq2seq_model
ModuleNotFoundError: No module named'tensorflow.models'

Is there a way to solve this?

What tutorial/doc are you using?

I was reading an old reference

I’m trying T2T now
Replace the path with your Cent7 and proceed

But the error

AttributeError: module'tensorflow' has no attribute'logging'

These two tutorials rely on old TF (EOL) versions.

1 Like

there’s this newer tutorial to do seq2seq that might be helpful here: Neural machine translation with attention  |  Text  |  TensorFlow

2 Likes

As he was playing with chatbots do you know what Is the official alternative to:

not from the top of my head. I think the easiest would be to adapt that tutorial to use a Transformer from TFHub.
That would be an interesting project.
one problem is that from the blog post, the colab is giving 404, I guess it was moved

It was deprecated with:

The commit claimed that the community folder general replacement is https://devlibrary.withgoogle.com/

1 Like

I didn’t know about this url!
Thanks for sharing, lot’s of cool stuff!