ImportError: cannot import name '_like_rnncell' #72

Open
opened 2025-10-14 17:18:59 -06:00 by navan · 0 comments
Owner

Originally created by @ssell on 10/18/2018

System:

  • Windows 10 1803
  • Python 3.6.2
  • TensorFlow 1.11.0

Error:

Traceback (most recent call last):
File "test.py", line 1, in <module>
    import demo
File "C:\Projects\ml\handwriting-synthesis\demo.py", line 9, in <module>
    from rnn import rnn
File "C:\Projects\ml\handwriting-synthesis\rnn.py", line 10, in <module>
    from rnn_ops import rnn_free_run
File "C:\Projects\ml\handwriting-synthesis\rnn_ops.py", line 9, in <module>
    from tensorflow.python.ops.rnn_cell_impl import _concat, _like_rnncell
ImportError: cannot import name '_like_rnncell'

Solution:

Hacky, but I simply removed the reference to _like_rnncell on lines 9, 29, and 30 in rnn_ops.py. Seems to run fine afterwards (though this led to encountering Issue #17).

*Originally created by @ssell on 10/18/2018* **System:** - Windows 10 1803 - Python 3.6.2 - TensorFlow 1.11.0 **Error:** Traceback (most recent call last): File "test.py", line 1, in <module> import demo File "C:\Projects\ml\handwriting-synthesis\demo.py", line 9, in <module> from rnn import rnn File "C:\Projects\ml\handwriting-synthesis\rnn.py", line 10, in <module> from rnn_ops import rnn_free_run File "C:\Projects\ml\handwriting-synthesis\rnn_ops.py", line 9, in <module> from tensorflow.python.ops.rnn_cell_impl import _concat, _like_rnncell ImportError: cannot import name '_like_rnncell' **Solution:** Hacky, but I simply removed the reference to `_like_rnncell` on lines 9, 29, and 30 in [rnn_ops.py](https://github.com/sjvasquez/handwriting-synthesis/blob/master/rnn_ops.py). Seems to run fine afterwards (though this led to encountering Issue #17).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/handwriting-synthesis#72
No description provided.