Open shiffman opened 4 years ago
Tested this in the up-to-date Colab environment with tensorflow 2.5.0, which gave the error message
ModuleNotFoundError: No module named 'tensorflow.contrib'
for the line
from tensorflow.contrib import rnn
These examples show, how to implement LSTM-based char-RNN with recent tensorflow versions:
One possible workaround would be using Docker image with Tensorflow 1.15.4 and Python 2:
docker run -it -v /home/user1/project1:/project1 -u user1 tensorflow/tensorflow:1.15.4
Change /home/user1/project1
to the directory with files you would like to access in container. The directory in the container, /project1
, might be changed too.
The user user1
must be changed to your own user name. The user option -u user1
might be left out completely, but then the files created in the container will belong to the user root
.
I believe this training script only works with tensorflow 1.x so just noting that we should test / upgrade for compatibility with tensorflow 2.0 at some point.