TensorFlow 学习(十五)—— tensorflow.python.platform

tensorflow.python.platform 下的常用工具类和工具函数:tensorflow/tensorflow/python/platform at master · tensorflow/tensorflow · GitHub

1. gfile

那么什么情况下使用 tf.gfile 呢,其主要作用有以下两点:

Why use tensorflow gfile? (for file I/O)

  • 提供类似 Python 的 file对象的 api;
  • 提供基于 tensorflow 下的 C++ FileSystem API 的实现;
    • tf.gfile 是对文件系统的抽象;
      • local files,
      • Google Cloud Storage (using a gs:// prefix),
      • and HDFS (using an hdfs:// prefix)
原文地址:https://www.cnblogs.com/mtcnn/p/9421582.html