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

Method _create_split

python/singa/sonnx.py:1269–1282  ·  view source on GitHub ↗

get the Split 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

1267
1268 @classmethod
1269 def _create_split(cls, onnx_node, operator, opset_version=_opset_version):
1270 """
1271 get the Split operator from onnx node
1272 Args:
1273 onnx_node (OnnxNode): a given onnx node
1274 operator (Operator Class): a singa operator class
1275 opset_version (int): the opset version
1276 Returns:
1277 singa operator instance
1278 """
1279 axis = onnx_node.getattr("axis", 0)
1280 split = onnx_node.getattr("split", None)
1281 num_output = len(onnx_node.outputs)
1282 return operator(axis, split, num_output)
1283
1284 @classmethod
1285 def _create_squeeze_unsqueeze(cls,

Callers

nothing calls this directly

Calls 1

getattrMethod · 0.80

Tested by

no test coverage detected