- 在旧版的tensorflow中,gfile模块存在于 tensorflow.python.platform 之下,即,需要通过以下语句来引入:
from tensorflow.python.platform import gfile
- 在新版的tensrflow中,可以直接通过 tf.gfile 来调用
- 功能:提供类似 Python中 的
file对象的 api,用于文件的打开 - 示例:
image_raw_data = gfile.FastGFile(file_name,'rb').read()
官方文档:https://www.tensorflow.org/api_docs/python/tf/gfile/FastGFile
请尝试网页搜索
5437



被折叠的 条评论
为什么被折叠?



