TensorBoard使用

fromkeras.callbacksimportTensorBoard,ModelCheckpointfromdatetimeimportdatetimeTIMESTAMP="0:%Y-%m-%dT%H-%M-%S/}".format(datetime.now())train_log_dir='/home/Predict/logs/train/' TIMESTAMP#print(train_lo...

TensorBoard使用
from keras.callbacks import TensorBoard, ModelCheckpointfrom datetime import datetimeTIMESTAMP = "{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
在这里插入图片描述

源文地址:https://www.guoxiongfei.cn/csdn/7529.html
0