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

Method _create_expand

python/singa/sonnx.py:1237–1248  ·  view source on GitHub ↗

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

1235
1236 @classmethod
1237 def _create_expand(cls, onnx_node, operator, opset_version=_opset_version):
1238 """
1239 get the Expand operator from onnx node
1240 Args:
1241 onnx_node (OnnxNode): a given onnx node
1242 operator (Operator Class): a singa operator class
1243 opset_version (int): the opset version
1244 Returns:
1245 singa operator instance
1246 """
1247 onnx_node.set_attr_inputs(onnx_node.inputs[1], 'shape')
1248 return operator(None)
1249
1250 @classmethod
1251 def _create_cast(cls, onnx_node, operator, opset_version=_opset_version):

Callers

nothing calls this directly

Calls 1

set_attr_inputsMethod · 0.80

Tested by

no test coverage detected