hardmaru / write-rnn-tensorflow

Generative Handwriting using LSTM Mixture Density Network with TensorFlow
700 stars 166 forks source link

Got NotImplementedError: Negative indices are currently unsupported #2

Open yeze322 opened 8 years ago

yeze322 commented 8 years ago
write-rnn-tensorflow/model.py", line 50, in __init__
    self.final_state = states[-1]
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 124, in _SliceHelper
    raise NotImplementedError("Negative indices are currently unsupported")
NotImplementedError: Negative indices are currently unsupported

It seems the tensorflow lib has been changed !

rajshah4 commented 8 years ago

whew, glad I am not alone on this. I also had this error today with tensor flow 0.7.1 I found this message that also makes it looks like things have changed:

https://github.com/tensorflow/skflow/issues/112 Thanks

hardmaru commented 8 years ago

Thanks for the spot, the API must have changed (I made this demo in November 2015 on the very first public release of TensorFlow 0.50).

states[-1] just corresponds to the very last state of the LSTM loop, have to look at what has changed in the API and reflect that back into that line.

If you are able to fix it and get it working with v 0.7+ please submit pull request and I'll merge it in.