TensorBoard使用

from keras.callbacks import TensorBoard, ModelCheckpoint
from datetime import datetime
TIMESTAMP = "{0:%Y-%m-%dT%H-%M-%S/}".format(datetime.now())
train_log_dir = '/home/Predict/logs/train/' + TIMESTAMP
#print(train_log_dir)
tensorboard_callback = TensorBoard(log_dir=train_log_dir, histogram_freq=0, write_grads=False, batch_size=128,write_graph=True, write_images=False, embeddings_freq=0, embeddings_layer_names=None, embeddings_metadata=None)
callbacks_list = [tensorboard_callback]

在代码对应位置建立logs/train文件夹,然后右键启动终端输入:
tensorboard --logdir=logs
TensorBoard使用_第1张图片

你可能感兴趣的:(machine,learning)