0

I am trying to use TensorBoard with Keras and I follow the instructions in this short tutorial: http://fizzylogic.nl/2017/05/08/monitor-progress-of-your-keras-based-neural-network-using-tensorboard/

My code is:

from time import time

from keras.models import Sequential
from keras.layers import Dense, Activation
from keras.callbacks import TensorBoard


# Compile the model
model.compile(optimizer = 'adam', loss = 'categorical_crossentropy', metrics = ['accuracy'])

tensorboard = TensorBoard(log_dir="logs/{}".format(time()))

# Fit the model
model.fit(X, y, validation_split = 0.3, epochs=30, callbacks = [tensorboard])

The code is executed without any problem.

Following the advice of the tutorial:

Monitoring progress Now that you have a tensorboard instance hooked up you can start to monitor the program by executing the following command in a separate terminal:

tensorboard --logdir=logs/

I open a terminal and execute the aforementioned command. This is what I get:

(base) C:\Users\Alienware\Documents>tensorboard --logdir=logs/
2019-01-07 22:02:56.109894: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
TensorBoard 1.8.0 at http://ALIENWARE-PC:6006 (Press CTRL+C to quit)
W0107 22:04:55.763794 Thread-1 application.py:274] path /[[_dataImageSrc]] not found, sending 404
W0107 22:04:55.779416 Thread-1 application.py:274] path /[[_imageURL]] not found, sending 404

I then open the webpage. This is what I see:

enter image description here

How can I sort this out?

4

1 回答 1

0

它需要保存数据的确切文件夹。您使用 current 格式化log_dir="logs/{}".format(time())目录,这显然与logs/. 默认情况下,日志目录是keras.callbacks.TensorBoard(log_dir='./logs',...).

您需要删除时间格式或从tensorboard正确的目录开始。

于 2019-01-07T20:31:45.467 回答