Tensorflow code uses methods for file I/O that are different than python builtin methods. According to the source code, it is useful as
"File I/O wrappers without thread locking"
I am not sure on what occasions it is useful and when it shouldn't be used.
Any idea?
Thank you
This comment:
File I/O wrappers without thread locking
...is a particularly unhelpful description for TensorFlow's tf.gfile
module!
The main roles of the tf.gfile
module are:
file
objects, and
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With