write-rnn-tensorflow icon indicating copy to clipboard operation
write-rnn-tensorflow copied to clipboard

Got NotImplementedError: Negative indices are currently unsupported

Open yeze322 opened this issue 9 years ago • 2 comments
trafficstars

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 !

yeze322 avatar Mar 06 '16 15:03 yeze322

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

rajshah4 avatar Mar 07 '16 00:03 rajshah4

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.

hardmaru avatar Mar 07 '16 01:03 hardmaru