问题所在

使用回调函数callbacks时,报错。错误代码是:
callbacks = [ tf.keras.callbacks.EarlyStopping(patience=2, monitor='val_loss'), tf.keras.callbacks.TensorBoard(log_dir='./logs') ] model.fit(train_x, train_y, batch_size=16, epochs=5, callbacks=callbacks, validation_data=(val_x, val_y)) `

广大网友的解决办法

增加一部分代码,添加路径。
logdir = “./callbacks” 这个写法会报错,要使用下面的os.path写法。
报错ProfilerNotRunningError: Cannot stop profiling. No profiler is running.

我的解决办法

然而并没有解决,依旧报错。
没办法,为了继续往下跑程序,只能把tensorbord这一块删除掉。然后就跑出来了。
报错ProfilerNotRunningError: Cannot stop profiling. No profiler is running.

虽然程序跑出来了,但是依旧没有解决本质问题。
如果广大网友有更好的建议,请不吝赐教哦。

相关文章:

  • 2022-12-23
  • 2021-07-30
  • 2021-08-21
  • 2021-06-01
  • 2021-06-29
  • 2022-03-04
  • 2021-04-20
  • 2022-01-16
猜你喜欢
  • 2021-07-01
  • 2021-08-31
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
相关资源
相似解决方案