MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / draw_net

Function draw_net

rtpose_wrapper/python/caffe/draw.py:205–223  ·  view source on GitHub ↗

Draws a caffe net and returns the image string encoded using the given extension. Parameters ---------- caffe_net : a caffe.proto.caffe_pb2.NetParameter protocol buffer. ext : string, optional The image extension (the default is 'png'). phase : {caffe_pb2.Phase.TRAIN

(caffe_net, rankdir, ext='png', phase=None)

Source from the content-addressed store, hash-verified

203
204
205def draw_net(caffe_net, rankdir, ext='png', phase=None):
206 """Draws a caffe net and returns the image string encoded using the given
207 extension.
208
209 Parameters
210 ----------
211 caffe_net : a caffe.proto.caffe_pb2.NetParameter protocol buffer.
212 ext : string, optional
213 The image extension (the default is 'png').
214 phase : {caffe_pb2.Phase.TRAIN, caffe_pb2.Phase.TEST, None} optional
215 Include layers from this network phase. If None, include all layers.
216 (the default is None)
217
218 Returns
219 -------
220 string :
221 Postscript representation of the graph.
222 """
223 return get_pydot_graph(caffe_net, rankdir, phase=phase).create(format=ext)
224
225
226def draw_net_to_file(caffe_net, filename, rankdir='LR', phase=None):

Callers 1

draw_net_to_fileFunction · 0.85

Calls 1

get_pydot_graphFunction · 0.85

Tested by

no test coverage detected