最佳答案
没有简单的方法只用一行代码插入它,您必须手动编写摘要。
好消息是它并不难,您可以使用 TensorBoard callback code在 Keras 作为引用。 (还有一个 version 2 为 TensorFlow 2.x 做好准备。)
基本上,编写一个函数,例如write_summaries(model)
并在您想编写摘要时调用它(例如,在您的 fit_generator()
之后)
在你的 write_summaries(model)
函数中使用 tf.summary
、histogram_summary
和其他摘要函数来记录你想在 tensorboard 上看到的数据.
如果您不确切知道如何检查 official tutorial : 和 MNIST with summaries 这个很好的例子.
关于python - 使用 Keras 和 fit_generator 的 TensorBoard 分布和直方图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42425858/