未找到张力板

问题描述 投票:1回答:1

我正在尝试使用张量板仪表板来检查模型性能。下面是我使用的代码:

from keras.callbacks import TensorBoard
%load_ext tensorboard

log_dir = "logs/fit/" + datetime.now().strftime("%Y%m%d-%H%M%S")

tensorboard_callback = TensorBoard(log_dir=log_dir, histogram_freq=1)

checkpoint_name = 'Weights-{epoch:03d}--{val_loss:.5f}.hdf5' 

checkpoint = ModelCheckpoint(checkpoint_name, monitor='val_loss', verbose = 1, save_best_only = True, mode ='auto')

es = EarlyStopping(monitor='val_loss', verbose=1, patience=10)

callbacks_list = [checkpoint ,es,tensorboard_callback]

NN_model.fit(train, target, epochs=100, batch_size=32, validation_split = 0.2, callbacks=callbacks_list)

但是经过模型训练后,我无法显示仪表板:

%tensorboard --logdir logs

这是我得到的错误:

ERROR: Could not find `tensorboard`. Please ensure that your PATH
contains an executable `tensorboard` program, or explicitly specify
the path to a TensorBoard binary by setting the `TENSORBOARD_BINARY`
environment variable.
tensorflow tensorboard
1个回答
0
投票

您需要在终端上执行tensorboard命令以打开tensorboard服务器。

命令应该是

tensorboard --logdir="<path to your logdir>"
© www.soinside.com 2019 - 2024. All rights reserved.