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
error running aocr #48
Comments
In some versions of TF _linear was moved from rnn_cell to rnn_cell_impl. You need to modify /usr/local/lib/python2.7/dist-packages/aocr/model/seq2seq.py Change line 71 from "from tensorflow.contrib.rnn.python.ops import rnn, rnn_cell" Change line 74 "linear = rnn_cell._linear" to "rnn_cell_impl._linear" |
Yup, looks like it's been moved in 1.4, so aocr is lagging a little behind. @AdamWP would you mind submitting a PR? Ideally with a conditional |
@emedvedev Done! |
Thanks! Closing the issue. |
@emedvedev but how did you solve that? |
thanks so much!! |
@emedvedev #51 didn't work for me. I used tensorflow version 1.4.0 on ubuntu 16, python version 2.7. my seq2seq.py: from tensorflow.python.ops import nn_ops try: try: Any ideas? |
Can you paste the full error log you’re getting? Maybe there’s been another change between TF versions.
…On Apr 25, 2018, 23:55 +0200, avielas ***@***.***>, wrote:
@emedvedev #51 didn't work for me. I used tensorflow version 1.4.0 on ubuntu 16. my seq2seq.py:
from tensorflow.python.ops import nn_ops
from tensorflow.contrib.rnn.python.ops import rnn
from tensorflow.python.ops import variable_scope
try:
from tensorflow.contrib.rnn.python.ops import rnn_cell_impl
except ImportError:
from tensorflow.python.ops import rnn_cell_impl
try:
linear = rnn_cell_impl._linear # pylint: disable=protected-access
except AttributeError:
from tensorflow.contrib.rnn.python.ops import core_rnn_cell
linear = core_rnn_cell._linear # pylint: disable=protected-access
Any ideas?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
sure: |
I tried tf 1.2 1.4 1.8. what exactly version should I use? |
update error(tf 1.2): |
Thanks! One more thing: which aocr version are you running, and is there a difference in the error logs between the latest version in pip and the github master?
…On Apr 26, 2018, 00:18 +0200, avielas ***@***.***>, wrote:
update error(tf 1.2):
(virtualenv_aocr_0_7_3) @computer-name:~/DL/aocr-0.7.3$ sudo aocr dataset ./datasets/annotations-training.txt ./datasets/training.tfrecords
Traceback (most recent call last):
File "/usr/local/bin/aocr", line 9, in
load_entry_point('aocr==0.7.3', 'console_scripts', 'aocr')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2569, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2229, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2235, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "build/bdist.linux-x86_64/egg/aocr/main.py", line 15, in
File "build/bdist.linux-x86_64/egg/aocr/model/model.py", line 20, in
File "build/bdist.linux-x86_64/egg/aocr/model/seq2seq_model.py", line 27, in
File "build/bdist.linux-x86_64/egg/aocr/model/seq2seq.py", line 83, in
AttributeError: 'module' object has no attribute '_linear'
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
After installing aocr (
pip install aocr
) in both my OS and the official tensor docker container(gcr.io/tensorflow/tensorflow) I'm getting this error even when I runaocr --help
:The text was updated successfully, but these errors were encountered: