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

Method _create_squeeze_unsqueeze

python/singa/sonnx.py:1285–1299  ·  view source on GitHub ↗

get the Squeeze and Unsqueeze 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

1283
1284 @classmethod
1285 def _create_squeeze_unsqueeze(cls,
1286 onnx_node,
1287 operator,
1288 opset_version=_opset_version):
1289 """
1290 get the Squeeze and Unsqueeze operator from onnx node
1291 Args:
1292 onnx_node (OnnxNode): a given onnx node
1293 operator (Operator Class): a singa operator class
1294 opset_version (int): the opset version
1295 Returns:
1296 singa operator instance
1297 """
1298 axes = onnx_node.getattr("axes")
1299 return operator(axes)
1300
1301 @classmethod
1302 def _create_global_average_pool(cls,

Callers

nothing calls this directly

Calls 1

getattrMethod · 0.80

Tested by

no test coverage detected