zoukankan      html  css  js  c++  java
  • TensorFlow---基础---GFile

      使用TensorFlow的时候经常遇到 tf.gfile.exists()....

      关于gfile,一个googler是这样给出的解释:

    The main roles of the tf.gfile module are:

    1. To provide an API that is close to Python's file objects, and

    2. To provide an implementation based on TensorFlow's C++ FileSystem API.

    The C++ FileSystem API supports multiple file system implementations, including local files, Google Cloud Storage (using a gs:// prefix), and HDFS (using an hdfs:// prefix). TensorFlow exports these as tf.gfile so that you can uses these implementations for saving and loading checkpoints, writing TensorBoard logs, and accessing training data (among other uses). However, if all of your files are local, you can use the regular Python file API without any problem.

       大概意思是:

        1. 提供了一个处理Python文件类型的API

        2. 提供了一种基于TensorFlow的C++文件系统的API实现

       总之,就是为了更好的可扩展性(C++文件系统API支持多种文件系统的实现,比如本地文件,谷歌云、HDFS)。所以不管你底层是以上的那种文件系统,都是用gfile来进行文件操作就ok了! 当然如果你只是单机本地跑的话,那么直接使用普通的py下 file-API也是ok的!

  • 相关阅读:
    MySQL常用命令
    Jstack、Jmap命令简单使用
    MySQL慢查询日志ES索引模板
    MySQL二进制安装部署
    varnish启动报错
    基础训练 Sine之舞
    基础训练 FJ的字符串
    基础训练 芯片测试
    基础训练 龟兔赛跑预测
    基础训练 回形取数
  • 原文地址:https://www.cnblogs.com/luntai/p/6748877.html
Copyright © 2011-2022 走看看