Skip to content
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

Some questions about RegisterShape #71

Open
alongwithyou opened this issue Jun 28, 2020 · 5 comments
Open

Some questions about RegisterShape #71

alongwithyou opened this issue Jun 28, 2020 · 5 comments

Comments

@alongwithyou
Copy link

Traceback (most recent call last):
File "tests/test_warprnnt_op.py", line 3, in
from warprnnt_tensorflow import rnnt_loss
File "/NEWAI/Speech/Member/gaoxinglong/bin/anaconda3/lib/python3.7/site-packages/warprnnt_tensorflow-0.1-py3.7-linux-x86_64.egg/warprnnt_tensorflow/init.py", line 44, in
@ops.RegisterShape("WarpRNNT")
AttributeError: module 'tensorflow.python.framework.ops' has no attribute 'RegisterShape'

@PeiyanFlying
Copy link

Hello sir, I meet with the same problem as yours. So have you solved this bug?
Really appreciate your answer.
Many thanks!

@bhaswa
Copy link

bhaswa commented Jul 10, 2020

I am also getting the same issue. Any update on this?
Thanks!

@pyyush
Copy link

pyyush commented Aug 18, 2020

TFv2.3.0

======================================================================
ERROR: test_basic (unittest.loader._FailedTest)

ImportError: Failed to import test module: test_basic
Traceback (most recent call last):
File "/N/soft/rhel7/deeplearning/Python-3.8.5/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/N/soft/rhel7/deeplearning/Python-3.8.5/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
import(name)
File "/N/slate/piyush/warp-transducer/tensorflow_binding/tests/test_basic.py", line 3, in
from warprnnt_tensorflow import rnnt_loss
File "/N/slate/piyush/warp-transducer/tensorflow_binding/warprnnt_tensorflow/init.py", line 44, in
@ops.RegisterShape("WarpRNNT")
AttributeError: module 'tensorflow.python.framework.ops' has no attribute 'RegisterShape'

======================================================================
ERROR: test_warprnnt_op (unittest.loader._FailedTest)

ImportError: Failed to import test module: test_warprnnt_op
Traceback (most recent call last):
File "/N/soft/rhel7/deeplearning/Python-3.8.5/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/N/soft/rhel7/deeplearning/Python-3.8.5/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
import(name)
File "/N/slate/piyush/warp-transducer/tensorflow_binding/tests/test_warprnnt_op.py", line 3, in
from warprnnt_tensorflow import rnnt_loss
File "/N/slate/piyush/warp-transducer/tensorflow_binding/warprnnt_tensorflow/init.py", line 38, in
def _RNNTLossGrad(op, grad_loss, _):
File "/N/soft/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 2598, in call
_gradient_registry.register(f, self._op_type)
File "/N/soft/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages/tensorflow/python/framework/registry.py", line 58, in register
raise KeyError(
KeyError: "Registering two gradient with name 'WarpRNNT'! (Previous registration was in register /N/soft/rhel7/deeplearning/Python-3.8.5/lib/python3.8/site-packages/tensorflow/python/framework/registry.py:66)"


Ran 2 tests in 0.000s

FAILED (errors=2)
Test failed: <unittest.runner.TextTestResult run=2 errors=2 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=2 errors=2 failures=0>

@muyamu
Copy link

muyamu commented Oct 11, 2020

tensorflow2.0 version has RegisterShape.

@wilson1692
Copy link

I have a problem, can help me please
AttributeError: module 'tensorflow.python.framework.ops' has no attribute 'RegisterShape'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants