- tensorflow 训练时代码修改
self.__model.fit([train_X['press_picture'], train_X['flex_data']], train_y,
validation_data=([test_X['press_picture'], test_X['flex_data']], test_y),
batch_size=10, epochs=20, callbacks=[TensorBoard(log_dir='mytensorboard')])
加上 , callbacks=[TensorBoard(log_dir=‘mytensorboard’)]
则 tensorflow 训练数据就保存在 mytensorboard 文件夹中
2.运行 tensorboard
tensorboard --logdir=mytensorboard
3.在浏览器运行
http://localhost:6006/
4.最终效果如下