practical_seq2seq
practical_seq2seq copied to clipboard
no attribute 'seq2seq'
I get the following error: AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'seq2seq' It should be related to my tensorflow's version. Although I tried with 0.11, 0.12 and 1.0, I cannot get it running. Any idea?
Thanks
the same with u :-)
im trying to find some solutions
what is your tensorflow version? try tensorflow.contrib.seq2seq if you are using the latest version.
Hi, replace this code in previous code(in seq2seqwraper.py)
basic_cell = tf.contrib.rnn.core_rnn_cell.DropoutWrapper(
tf.contrib.rnn.core_rnn_cell.BasicLSTMCell(emb_dim, state_is_tuple=True),
output_keep_prob=self.keep_prob)
# stack cells together : n layered model
stacked_lstm = tf.contrib.rnn.core_rnn_cell.MultiRNNCell([basic_cell]*num_layers, state_is_tuple=True)
Thank you
what is your tensorflow version? try tensorflow.contrib.seq2seq if you are using the latest version.
Earlier the error was "AttributeError: module 'tensorflow.contrib.seq2seq' has no attribute 'model_with_buckets'" and then I tried "tensorflow.contrib.seq2seq" and now the error is "AttributeError: module 'tensorflow.contrib.seq2seq' has no attribute 'model_with_buckets' "
@kartikitrak : I think the problem is related to tensorflow version. You may downgrade tf to 1.2 (not sure the exact one when the repo was created) if you are using a newer version. Also there are plenty of more activate projects on seq2seq such as here.
Thank you @lkluo, Anyone can confirm the version of tensorflow ?
@kartikitrak, replace tensorflow.contrib.seq2seq with tensorflow.contrib.legacy_seq2seq Works for me
Mode : train
Preparing data in working_dir/
Tokenizing data in data/train.enc
tokenizing line 100000
Tokenizing data in data/train.dec
tokenizing line 100000
Tokenizing data in data/test.enc
Tokenizing data in data/test.dec
Creating 3 layers of 256 units.
Traceback (most recent call last):
File "F:/1_tensorflow/code/Technical-Analysis-And-Practice-in-TensorFlow-master/source/11/execute.py", line 300, in
It did not work for me as well with tensorflow 1.0.+ but is working for me with "tensorflow 0.12.1",
## uninstall latest versions
pip uninstall tensorflow
Uninstalling tensorflow-1.1.0:
Would remove:
/usr/local/bin/tensorboard
/usr/local/lib/python2.7/site-packages/external/*
/usr/local/lib/python2.7/site-packages/tensorflow-1.1.0.dist-info/*
/usr/local/lib/python2.7/site-packages/tensorflow/*
Proceed (y/n)? y
Successfully uninstalled tensorflow-1.1.0
# install older tensorflow version
pip install tensorflow==0.12.1
λ python execute.py
>> Mode : train
Preparing data in working_dir/
Creating 3 layers of 256 units.
WARNING:tensorflow:From /Users/prayagupd/soundofmusic/compile1010/tensorflow_chatbot/seq2seq_model.py:174 in __init__.: all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Please use tf.global_variables instead.
Created model with fresh parameters.
WARNING:tensorflow:From execute.py:120 in create_model.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
Reading development and training data (limit: 0).
reading data line 100000