I have the following code to read file names from a directory:
directory = "C:/pics/*.csv" file_names=tf.train.match_filenames_once(directory) print(file_names) <tf.Variable 'matching_filenames_1:0' shape=<unknown> dtype=string_ref> with tf.Session() as sess: tf.global_variables_initializer().run() print(sess.run(file_names))
When I start a session, I get the following error: "Trying to use uninitialized match_filenames"
Please tell me what I'm doing wrong.
source share