Using Tensorflow I am trying to verify that a file exists before reading it with tf.read_file(filename). Unfortunately, the way my pipeline is setup, I am generating the filename string on the fly using tf commands. I generate my filename string using tf.string_join and then would like to verify that the file exists by calling tf.gfile.Exists. Unfortunately, tf.gfile.Exists only accepts strings, and not Tensors. How can I verify that a file exists within Tensorflow? Can I evaluate the tensor at runtime? Any other workaround or a proper way of doing it?