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)
| 203 | |
| 204 | |
| 205 | def 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 | |
| 226 | def draw_net_to_file(caffe_net, filename, rankdir='LR', phase=None): |
no test coverage detected