Apache SINGA
A distributed deep learning platform .
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | List of all members
singa::Graph Class Reference

Neuralnet is constructed by creating a graph with each node representing one layer at first. More...

#include <graph.h>

Public Member Functions

const std::vector< Node * > & nodes () const
 
Nodenode (const std::string &name) const
 
void AddNode (Node *node)
 
NodeAddNode (const std::string &name)
 
void AddEdge (Node *srcnode, Node *dstnode)
 
void AddEdge (const std::string &src, const std::string &dst)
 
void RemoveEdge (Node *src, Node *dst)
 
void RemoveEdge (const std::string &src, const std::string &dst)
 
std::string ToJson () const
 Dump the graph into json string which can be used to draw a picture by graphviz.
 
std::string ToJson (const std::map< std::string, std::string > &info) const
 ToJson() More...
 
void Sort ()
 Do topology sort for all nodes of the graph.
 

Detailed Description

Neuralnet is constructed by creating a graph with each node representing one layer at first.

After topology sort for graph nodes, layers are created and connected.

Member Function Documentation

Node* singa::Graph::node ( const std::string &  name) const
inline
Parameters
namenode name
Returns
return the node of given name
const std::vector<Node*>& singa::Graph::nodes ( ) const
inline
Returns
all nodes of the graph
std::string singa::Graph::ToJson ( const std::map< std::string, std::string > &  info) const

ToJson()

Parameters
infoinfo associated with each node

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