我试图使用TensorBoard仪表板来检查模型的性能。以下是我使用的代码:
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.