1
votes

I am using TensorFlow with Keras to train a classifier and I tried adding TensorBoard as a callback parameter to the fit method. I have installed TensorFlow 2.0 correctly and am also able to load TensorBoard by calling %load_ext tensorboard. I am working on Google Colab and thought I would be able to save the logs to Google Drive during training, so that I can visualize them with TensorBoard. However, when I try to fit the data to the model along with the TensorBoard callback, I get this error:

File system scheme '[local]' not implemented (file: '/content/drive/My Drive/KInsekten/logs/20200409-160657/train') Encountered when executing an operation using EagerExecutor.

I initialized the TensorBoard callback like this:

logs_base_dir = "/content/drive/My Drive/KInsekten/logs/"
if not os.path.exists(logs_base_dir):
  os.mkdir(logs_base_dir)
log_dir = logs_base_dir + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
tensor_board = tf.keras.callbacks.TensorBoard(log_dir = log_dir, histogram_freq = 1, 
                                              write_graph = True, write_images = True)
1

1 Answers

2
votes

I was facing the same issue. The issue is that TPU can't use the local filesystem we have to create a separate bucket on cloud storage and configure it with TPU. Following are the two links from google cloud official TPU documentation in the first link the main problem is discussed and in the 2nd link the actual solution is implemented.

The main problem disscussed

Solution to this problem