Caffe2 - Python API
A deep learning, cross platform ML framework
Functions | Variables
net_drawer Namespace Reference

Module caffe2.python.net_drawer. More...

Functions

def GetOpNodeProducer (append_output, kwargs)
 
def GetPydotGraph (operators_or_net, name=None, rankdir='LR', node_producer=None)
 
def GetPydotGraphMinimal (operators_or_net, name=None, rankdir='LR', minimal_dependency=False, node_producer=None)
 
def GetOperatorMapForPlan (plan_def)
 
def GetPlanGraph (plan_def, name=None, rankdir='TB')
 
def GetGraphInJson (operators_or_net, output_filepath)
 
def GetGraphPngSafe (func, args, kwargs)
 
def main ()
 

Variables

 logger = logging.getLogger(__name__)
 
 pydot = None
 
dictionary OP_STYLE
 
dictionary BLOB_STYLE = {'shape': 'octagon'}
 

Detailed Description

Module caffe2.python.net_drawer.

Function Documentation

◆ GetGraphPngSafe()

def net_drawer.GetGraphPngSafe (   func,
  args,
  kwargs 
)
Invokes `func` (e.g. GetPydotGraph) with args. If anything fails - returns
and empty image instead of throwing Exception

Definition at line 324 of file net_drawer.py.

◆ GetPydotGraphMinimal()

def net_drawer.GetPydotGraphMinimal (   operators_or_net,
  name = None,
  rankdir = 'LR',
  minimal_dependency = False,
  node_producer = None 
)
Different from GetPydotGraph, hide all blob nodes and only show op nodes.

If minimal_dependency is set as well, for each op, we will only draw the
edges to the minimal necessary ancestors. For example, if op c depends on
op a and b, and op b depends on a, then only the edge b->c will be drawn
because a->c will be implied.

Definition at line 134 of file net_drawer.py.

Variable Documentation

◆ OP_STYLE

dictionary net_drawer.OP_STYLE
Initial value:
1 = {
2  'shape': 'box',
3  'color': '#0F9D58',
4  'style': 'filled',
5  'fontcolor': '#FFFFFF'
6 }

Definition at line 33 of file net_drawer.py.