ONE - On-device Neural Engine
Loading...
Searching...
No Matches
moco::NodeDefTable Class Reference

Class to store and query tensorflow::NodeDef* with string name key. More...

#include <GraphBuilderContext.h>

Public Member Functions

void enroll (const std::string &node_name, const tensorflow::NodeDef *node)
 Registers a name with corresponding tensorflow::NodeDef*.
 
const tensorflow::NodeDef * node (const std::string &node_name) const
 Queries enrolled(registered) with name and return node if found Will throw runtime_error if not found.
 

Detailed Description

Class to store and query tensorflow::NodeDef* with string name key.

Definition at line 37 of file GraphBuilderContext.h.

Member Function Documentation

◆ enroll()

void moco::NodeDefTable::enroll ( const std::string &  node_name,
const tensorflow::NodeDef *  node 
)

Registers a name with corresponding tensorflow::NodeDef*.

Definition at line 27 of file GraphBuilderContext.cpp.

28{
29 MapNameNode_t::iterator iter = _table.find(node_name);
30
31 if (iter != _table.end())
32 {
33 throw oops::UserExn("Duplicate node name in GraphDef", node_name);
34 }
35
36 _table[node_name] = node;
37}
const tensorflow::NodeDef * node(const std::string &node_name) const
Queries enrolled(registered) with name and return node if found Will throw runtime_error if not found...
Exception to user.
Definition UserExn.h:42

References node().

◆ node()

const tensorflow::NodeDef * moco::NodeDefTable::node ( const std::string &  node_name) const

Queries enrolled(registered) with name and return node if found Will throw runtime_error if not found.

Definition at line 39 of file GraphBuilderContext.cpp.

40{
41 MapNameNode_t::const_iterator iter = _table.find(node_name);
42
43 if (iter == _table.end())
44 {
45 throw oops::UserExn("Cannot find node with name in GraphDef", node_name);
46 }
47
48 return iter->second;
49}

Referenced by enroll().


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