MCPcopy Create free account
hub / github.com/apache/singa / _create_global_average_pool

Method _create_global_average_pool

python/singa/sonnx.py:1302–1316  ·  view source on GitHub ↗

get the GlobalAveragePool operator from onnx node Args: onnx_node (OnnxNode): a given onnx node operator (Operator Class): a singa operator class opset_version (int): the opset version Returns: singa operator instance

(cls,
                                    onnx_node,
                                    operator,
                                    opset_version=_opset_version)

Source from the content-addressed store, hash-verified

1300
1301 @classmethod
1302 def _create_global_average_pool(cls,
1303 onnx_node,
1304 operator,
1305 opset_version=_opset_version):
1306 """
1307 get the GlobalAveragePool operator from onnx node
1308 Args:
1309 onnx_node (OnnxNode): a given onnx node
1310 operator (Operator Class): a singa operator class
1311 opset_version (int): the opset version
1312 Returns:
1313 singa operator instance
1314 """
1315 data_format = onnx_node.getattr("data_format", 'channels_first')
1316 return operator(data_format)
1317
1318 @classmethod
1319 def _create_leakyrelu(cls,

Callers

nothing calls this directly

Calls 1

getattrMethod · 0.80

Tested by

no test coverage detected