Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to experiment with sample.py #24

Closed
ritiek opened this issue Oct 16, 2017 · 2 comments
Closed

Unable to experiment with sample.py #24

ritiek opened this issue Oct 16, 2017 · 2 comments

Comments

@ritiek
Copy link

ritiek commented Oct 16, 2017

When I run %run -i sample.py in IPython console or just python sample.py, I get the following error:

In [1]: %run -i sample.py
WARNING:tensorflow:<tensorflow.python.ops.rnn_cell_impl.BasicLSTMCell object at 0x7f093d719390>: Using a concatenated state is slower and will soon be deprecated. Use state_is_tuple=True.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~/Downloads/write-rnn-tensorflow/sample.py in ()
34 saved_args = pickle.load(f)
35
---> 36 model = Model(saved_args, True)
37 sess = tf.InteractiveSession()
38 #saver = tf.train.Saver(tf.all_variables())

~/Downloads/write-rnn-tensorflow/model.py in init(self, args, infer)
46 # inputs = tf.split(axis=1, num_or_size_splits=args.seq_length, value=self.input_data)
47 # inputs = [tf.squeeze(input_, [1]) for input_ in inputs]
---> 48 inputs = tf.unpack(self.input_data, axis=1)
49
50 outputs, state_out = tf.contrib.legacy_seq2seq.rnn_decoder(inputs, self.state_in, cell, loop_function=None, scope='rnnlm')

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

Does this has something to do with the latest version of Tensorflow? I am using v1.3.0 if that helps.

@yaylinda
Copy link
Contributor

yaylinda commented Nov 6, 2017

change unpack to unstack for your version of tensorflow

@ritiek
Copy link
Author

ritiek commented Nov 7, 2017

Thanks! That seems to fix it but now I'm running into #26.

@ritiek ritiek closed this as completed Nov 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants