pycharm - 在pycharm中使用display.Image时看不到图像
问题描述
workspace.SwitchWorkspace("net_test", True)
print("Current blobs in the workspace: {}".format(workspace.Blobs()))
net = core.Net("my_first_net")
print("Current network proto:\n{}".format(net.Proto()))
X = net.GaussianFill([], ["X"], mean=0.0, std=1.0, shape=[2, 3], run_once=0)
print("New network proto:\n{}".format(net.Proto()))
W = net.GaussianFill([], ["W"], mean=0.0, std=1.0, shape=[5, 3], run_once=0)
b = net.ConstantFill([], ["b"], shape=[5, ], value=1.0, run_once=0)
Y = net.FC([X, W, b], ["Y"])
print("Current network proto:\n\n{}".format(net.Proto()))
graph = net_drawer.GetPydotGraph(net, rankdir="LR")
display.Image(graph.create_png(), width=800)
当我测试caffe2时,我使用上面的代码来查看网络结构。但它没有显示图像。这就是我得到的。<IPython.core.display.Image object>
那么我怎样才能得到图像呢?顺便说一句,我使用 PyCharm 和 iPython 来执行它。
解决方案
推荐阅读
- ios - 适用于 Xamarin.iOS 的 DevOps 构建管道,我是否需要为 UI 测试创建发布版本?
- python - Python获得最高价格总和3条最高记录
- docker - 将 apache 气流 docker 运算符与无根 docker 一起使用
- merge - 合并两个具有非同步相似性的 mySQL 列
- vba - .vba 中的附件问题
- javascript - 如何使用相同的按钮样式但不同的操作(ReactJs)
- kotlin - 如何在 Firestore 中获取 Subocllection 参考
- python - 参数“amount”错误的 Fixx 转换为“int”失败
- python - 使用 xml.etree.ElementTree 从 XML 文档输出 .text
- html - CSS对角线分隔2个图像