Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/313.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Keras plot_model()函数:更精细的输出_Python_Keras - Fatal编程技术网

Python Keras plot_model()函数:更精细的输出

Python Keras plot_model()函数:更精细的输出,python,keras,Python,Keras,我正在使用Keras来可视化我的机器学习模型。除了输出的第一个节点总是简单的问题之外,这个函数还有一个让我恼火的地方:它没有提供非常精细的输出。例如,我希望能够看到更多关于使用的损失函数、批量大小、历元数、使用的优化器等的信息 有什么方法可以从以前保存到磁盘并使用model_from_json()函数再次加载的模型中检索此信息吗?如何?如果您使用Tensorflow作为后端,它将创建交互式图形,您可以基于您的模型进行探索。 您只需将其作为回调添加到fit函数中,并确保设置了write\u gr

我正在使用Keras来可视化我的机器学习模型。除了输出的第一个节点总是简单的问题之外,这个函数还有一个让我恼火的地方:它没有提供非常精细的输出。例如,我希望能够看到更多关于使用的损失函数、批量大小、历元数、使用的优化器等的信息

有什么方法可以从以前保存到磁盘并使用model_from_json()函数再次加载的模型中检索此信息吗?

如何?如果您使用Tensorflow作为后端,它将创建交互式图形,您可以基于您的模型进行探索。

您只需将其作为回调添加到fit函数中,并确保设置了
write\u graph=True
(默认设置)。如果需要快捷方式,可以直接调用其方法,而不是作为回调传递:

tensorboard = TensorboardCallback()
tensorboard.set_model(model) # your model here, will write graph etc
tensorboard.on_train_end() # will close the writer

然后运行
tensorboard--logdir=./logs
启动服务器。

感谢您提供的有用提示。我确实使用TensorFlow作为后端。有没有一种简单的方法可以将张力板导出为(png)图像?应该可以从web界面导出,我现在记不起来了。