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

Method _create_reshape

python/singa/sonnx.py:1567–1578  ·  view source on GitHub ↗

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

1565
1566 @classmethod
1567 def _create_reshape(cls, onnx_node, operator, opset_version=_opset_version):
1568 """
1569 get the reshape operator from onnx node
1570 Args:
1571 onnx_node (OnnxNode): a given onnx node
1572 operator (Operator Class): a singa operator class
1573 opset_version (int): the opset version
1574 Returns:
1575 singa operator instance
1576 """
1577 onnx_node.set_attr_inputs(onnx_node.inputs[1], 'shape')
1578 return operator(None)
1579
1580 @classmethod
1581 def _create_slice(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