phylanx
phylanx copied to clipboard
Changing the output of ctc_decode_operation to be compatible with tensorflow
The tensorflow backend of keras returns a tuple where the first element is a list of size one.
@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.
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.
Here is an example that should produce two output tensors.