在不使用 fit 方法中的回调的情况下在 Tensorboard 中显示 Keras 图形
Display Keras graph in Tensorboard without using the callback in the fit method
是否可以在不使用 fit 方法中的 tensorboard 回调的情况下在 Tensorboard 中显示 Keras 图形?
是否可以从 Keras 中提取图形并使用 tensorflow FileWriter 显示图形?
tf.summary.FileWriter(logdir='logdir', graph=graph)
我想这样做是为了检查这部分图表的所有连接是否符合预期(此模型是远未完成的较大模型的一部分)。
谢谢。
从后端提取Tensorflow图并使用文件编写器,结果证明非常简单。
import tensorflow as tf
# Used to get the graph
from tensorflow.python.keras import backend as K
tb_path = "logs/"
# Simple model to test the tensorboard plotting
model = SimpleModel(50, 20, 10).build_model()
# Get the sessions graph
graph = K.get_session().graph
# Display with the tensorflow file writer
writer = tf.summary.FileWriter(logdir=tb_path, graph=graph)
是否可以在不使用 fit 方法中的 tensorboard 回调的情况下在 Tensorboard 中显示 Keras 图形?
是否可以从 Keras 中提取图形并使用 tensorflow FileWriter 显示图形?
tf.summary.FileWriter(logdir='logdir', graph=graph)
我想这样做是为了检查这部分图表的所有连接是否符合预期(此模型是远未完成的较大模型的一部分)。
谢谢。
从后端提取Tensorflow图并使用文件编写器,结果证明非常简单。
import tensorflow as tf
# Used to get the graph
from tensorflow.python.keras import backend as K
tb_path = "logs/"
# Simple model to test the tensorboard plotting
model = SimpleModel(50, 20, 10).build_model()
# Get the sessions graph
graph = K.get_session().graph
# Display with the tensorflow file writer
writer = tf.summary.FileWriter(logdir=tb_path, graph=graph)