phylanx icon indicating copy to clipboard operation
phylanx copied to clipboard

Changing the output of ctc_decode_operation to be compatible with tensorflow

Open shahrzad opened this issue 5 years ago • 3 comments

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

shahrzad avatar Apr 17 '19 15:04 shahrzad

@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.

taless474 avatar Apr 17 '19 15:04 taless474

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.

hkaiser avatar Apr 19 '19 19:04 hkaiser

Here is an example that should produce two output tensors.

taless474 avatar Dec 19 '19 20:12 taless474