安装张量板
导入它
from keras.callbacks import TensorBoard
</code>
将其加载到变量中
tbCallBack = TensorBoard(log_dir=’Graph’,
histogram_freq=10,
write_graph=True,
write_images=True)
</code>
然后将其用作训练中的回调:
model.fit(x, y, …
callbacks=[tbCallBack])
</code>
确保你有一个名为’Graph’的目录或任何你想要的目录。然后在终端训练之前运行:
tensorboard —logdir Graph
</code>
然后,您可以在浏览器中看到您的图表