6#include "dlinear/parser/onnx/NodeOpType.h"
11#include "dlinear/util/exception.h"
15const std::map<std::string, NodeOpType> string_to_node_op_type{
46std::ostream& operator<<(std::ostream& os,
const NodeOpType& op_type) {
53 return os <<
"AveragePool";
55 return os <<
"BatchNormalization";
57 return os <<
"Concat";
59 return os <<
"Constant";
63 return os <<
"Dropout";
65 return os <<
"Flatten";
67 return os <<
"Gather";
71 return os <<
"GlobalAveragePool";
73 return os <<
"Identity";
75 return os <<
"LeakyRelu";
79 return os <<
"MatMul";
81 return os <<
"MaxPool";
87 return os <<
"Reshape";
93 return os <<
"Sigmoid";
95 return os <<
"Softmax";
97 return os <<
"Squeeze";
101 return os <<
"Transpose";
103 return os <<
"Unsqueeze";
105 DLINEAR_UNREACHABLE();
Namespace for the ONNX parser of the dlinear library.
NodeOpType
Type of node operation.
@ MatMul
Matrix multiplication.
@ Gemm
General matrix multiplication.
@ GlobalAveragePool
Global average pooling.
@ BatchNormalization
Batch normalization.
@ AveragePool
Average pooling.
@ LRN
Local response normalization.
NodeOpType parseNodeOpType(const std::string &op_type)
Parse a string to a node operation type.