Class NodeParser

Class Documentation

class NodeParser

NodeParser defined a base class for parsing node’s attributes.

Public Functions

NodeParser() = default

Constructor.

virtual ~NodeParser() = default

Destructor.

inline virtual ops::BaseOperatorPtr Parse(const onnx::GraphProto &onnx_graph, const onnx::NodeProto &onnx_node)

Method to parse node of ONNX.

参数
  • onnx_graph[in] Define the onnx graph, which contains all information about the graph.

  • onnx_node[in] Define the node to be resolved.

返回

PrimitiveC Attribute storage.

inline virtual ops::BaseOperatorPtr Parse(const caffe::LayerParameter &proto, const caffe::LayerParameter &weight)

Method to parse node of CAFFE.

参数
  • proto[in] Define the node which contains attributes.

  • weight[in] Define the node which contains weight information.

返回

PrimitiveC Attribute storage.

inline virtual ops::BaseOperatorPtr Parse(const tensorflow::NodeDef &tf_op, const std::map<std::string, const tensorflow::NodeDef*> &tf_node_map, std::vector<std::string> *inputs, int *output_size)

Method to parse node of TF.

参数
  • tf_op[in] Define the node to be resolved.

  • tf_node_map[in] Define the all nodes of the graph.

  • inputs[in] Define the input name, that determines which inputs will be parsed including their order. Determined by user.

  • output_size[in] Define the output num of current node, which need to be determined by user.

返回

PrimitiveC Attribute storage.

inline virtual ops::BaseOperatorPtr Parse(const std::unique_ptr<tflite::OperatorT> &tflite_op, const std::unique_ptr<tflite::SubGraphT> &tflite_subgraph, const std::unique_ptr<tflite::ModelT> &tflite_model)

Method to parse node of TFLITE.

参数
  • tflite_op[in] Define the node to be resolved.

  • tflite_subgraph[in] Define the subgraph to be resolved.

  • tflite_model[in] Define the model, which contains all information abort the graph.

返回

PrimitiveC Attribute storage.