擅长:python、mysql、java
<p>由于文档和src代码中没有任何提示,我不知道为什么,但是使用b字符(我猜是二进制的)完全可以(tf版本:1.1.0):</p>
<pre><code>image_data = tf.gfile.FastGFile(filename, 'rb').read()
</code></pre>
<p><a href="https://github.com/tensorflow/tensorflow/blob/a0d784bdd31b27e013a7eac58a86ba62e86db299/tensorflow/python/platform/gfile.py#L54" rel="nofollow noreferrer">For more information, check out: gfile</a></p>