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