I can't see the image when using display.Image in pycharm

224 Views Asked by At
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)

When I tested the caffe2, I used above code to see the net structure. But it didn't show the image. And this is what I get. <IPython.core.display.Image object> So how can I get the image? By the way, I use PyCharm with iPython to execute it.

0

There are 0 best solutions below