You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tf Dataset with tf.py_func doesn't work as the tutorial says #12396
The problem stems from treating the list returned by tf.py_func() as an invitation to auto-stack the returned tensors into a single tensor. Converting it to tuple prevents that conversion from being attempted. The root cause is that the interpretation of lists in a Dataset nested structure changed between TF 1.2 and 1.3....
Reacted by Jun Deng, David Parks, Aravindh Kuppusamy, Joss Whittle and Ouwen Huang
Activity
mrry commentedon Aug 18, 2017
Thanks for reporting this problem. It's definitely a bug, and we're working on a fix.
mrry commentedon Aug 18, 2017
In the meantime, you can work around it with the following tweak:
The problem stems from treating the list returned by
tf.py_func()as an invitation to auto-stack the returned tensors into a single tensor. Converting it to tuple prevents that conversion from being attempted. The root cause is that the interpretation of lists in aDatasetnested structure changed between TF 1.2 and 1.3....jundengdeng commentedon Aug 18, 2017
Thanks for pointing out this trick. It works now when converting it to tuple. 👍
[tf.contrib.data] Fix handling of multi-output tf.py_func() in Datase…
Merge changes from github.