Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Types | Public Member Functions | Static Public Member Functions
nom::converters::DotGenerator< GraphT > Class Template Reference

Public Types

using NodePrinter = std::function< std::map< std::string, std::string >(typename GraphT::NodeRef)>
 
using EdgePrinter = std::function< std::map< std::string, std::string >(typename GraphT::EdgeRef)>
 

Public Member Functions

 DotGenerator (NodePrinter nodePrinter, EdgePrinter edgePrinter)
 
std::string convert (const typename GraphT::SubgraphType &sg, const std::vector< typename GraphT::SubgraphType * > &subgraphs) const
 
std::string convert (const typename GraphT::SubgraphType &sg) const
 
std::string convertStruct (const typename GraphT::SubgraphType &sg) const
 NOTE No subgraph support Converts given graph into DOT string w/operator input-order preserved Assumes graph is acyclic, nodes are unique_ptr (1) Get & print input nodes (nodes w/o parents) More...
 

Static Public Member Functions

static std::map< std::string, std::string > defaultEdgePrinter (typename GraphT::EdgeRef)
 

Detailed Description

template<typename GraphT>
class nom::converters::DotGenerator< GraphT >

Definition at line 20 of file Dot.h.

Member Function Documentation

template<typename GraphT>
std::string nom::converters::DotGenerator< GraphT >::convertStruct ( const typename GraphT::SubgraphType sg) const
inline

NOTE No subgraph support Converts given graph into DOT string w/operator input-order preserved Assumes graph is acyclic, nodes are unique_ptr (1) Get & print input nodes (nodes w/o parents)

  • Node: <p0>[shape=record, label="{{Data In}|{<p0>*}}"] (2) Find operators w/BFS from input nodes (3) Print operator records & incoming edges
  • Node: op_ptr[shape=record, label="{{<i0>*|<i1>*|...}|{op}|{<o0>*}"]
  • Edge: <parent_node_ptr>:<ref>:s -> <this_node_ptr>:<ref>:n

Definition at line 81 of file Dot.h.


The documentation for this class was generated from the following file: