openai / generating-reviews-discovering-sentiment

Code for "Learning to Generate Reviews and Discovering Sentiment"
https://arxiv.org/abs/1704.01444
MIT License
1.51k stars 379 forks source link

python encoder.py causes IndexError: list index out of range #29

Closed amalhtait closed 7 years ago

amalhtait commented 7 years ago

I'm having the following error when running: python encoder.py

Traceback (most recent call last): File "encoder.py", line 211, in mdl = Model() File "encoder.py", line 144, in init cells, states, logits = model(X, S, M, reuse=False)
File "encoder.py", line 93, in model inputs = [tf.squeeze(v, [1]) for v in tf.split(1, nsteps, words)] File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1208, in split num = size_splits_shape.dims[0] IndexError: list index out of range

And to note that 'size_splits_shape' is empty and 'num_or_size_splits' = 64 I tested with python2 and python3 (same error), version of tensorflow = 1.1.0

Am i using the script incorrectly? is it possible please to help me resolve this issue?

mrbeann commented 7 years ago

just check this

amalhtait commented 7 years ago

Thank you @mrbeann , it worked :)