Convert tensorflow tensor of ASCII codes to string

本秂侑毒 提交于 2019-12-23 21:40:13

问题


I am quite new to tensorflow, and I couldn't find what I wanted on tensorflow.org or online discussions.

I have a tensor of ASCII codes I would like to convert to a string (each tensor is a word).

In numpy I could just iterate and use chr(), but tensor object is not iterable.

Is there a function that operates on the whole tensor, or a method that does not require evaluation?

Thanks!

Python 3.6.1 and Tensorflow 1.2.1

来源:https://stackoverflow.com/questions/45593967/convert-tensorflow-tensor-of-ascii-codes-to-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!