helper.make_node() is a function in ONNX, used to create a node (Node).
The parameters of this function include:
name:节点的名称。
op_type:节点的操作类型。
inputs:节点的输入张量列表。
outputs:节点的输出张量列表。
attrs:节点的属性字典。
For example, the following code creates a node named "Reshape" that changes the input tensor from shape (3,224,224) to shape (1,768):
reshape_node = helper.make_node('Reshape', inputs=['input'], outputs=['output'], shape=[1, 768])
A node is a basic building block in the ONNX model, which represents an operation or operator. Each node has a type (type), which indicates the type of operation performed by the node.
Here are some common ONNX node types:
Add:加法运算
Div:除法运算
Mul:乘法运算
Sub:减法运算
Transpose:转置操作
ReduceMean:平均值归约操作
ReduceSum:求和归约操作
LogSoftmax:对数softmax归约操作
Softmax:softmax归约操作
Concat:连接操作
Split:分割操作
Pad:填充操作
Reshape:重塑操作
Conv:卷积操作
MaxPool:最大池化操作
AveragePool:平均池化操作
BatchNorm:批量归一化操作
LeakyReLU:泄漏整流线性单元激活函数
PRelu:部分整流线性单元激活函数
Elu:指数线性单元激活函数
Swish:双曲正切激活函数
Sigmoid:Sigmoid激活函数
Tanh:双曲正切激活函数
Identity:恒等节点,不执行任何操作。