1
关于Tensorflow的一个简短问题。Tensorflow:tf.gfile.Exist和Env :: FileExists返回True,空文件名
为什么当文件名为空字符串时,tf.gfile.Exist和Env :: FileExists方法的返回值为true?
import tensorflow as tf
print(tf.gfile.Exists("not_existing_file")) # False
print(tf.gfile.Exists("")) # True
cpp方法显示与python方法相同的行为。
auto env = tensorflow::Env::Default();
std::cout << env->FileExists("not_existing_file"); # False
std::cout << env->FileExists(""); # OK