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

Changing the output of ctc_decode_operation to be compatible with tensorflow #952

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shahrzad
Copy link
Contributor

The tensorflow backend of keras returns a tuple where the first element is a list of size one.

@taless474
Copy link
Contributor

@Scheherzade, thanks for your effort to make it compatible.
It raises a TypeError,

        decode_pred_tf, log_prob_pred_tf = K.ctc_decode(inputs,
>                                                       input_length, greedy=True)
E       TypeError: 'eval_wrapper' object is not iterable

tests\keras\backend\backend_test.py:1748: TypeError

It seems like now it cannot unpack the result.

@hkaiser hkaiser added this to the 0.0.1 milestone Apr 17, 2019
@hkaiser
Copy link
Member

hkaiser commented Apr 19, 2019

We need to rethink how we should handle this situation. The problem currently is that the ctc_decode primitive now returns a pair of values once evaluated, however Keras expects a pair of things that can be evaluated separately.

@taless474
Copy link
Contributor

Here is an example that should produce two output tensors.

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

Successfully merging this pull request may close these issues.

3 participants