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

Method _create_leakyrelu

python/singa/sonnx.py:1319–1333  ·  view source on GitHub ↗

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

1317
1318 @classmethod
1319 def _create_leakyrelu(cls,
1320 onnx_node,
1321 operator,
1322 opset_version=_opset_version):
1323 """
1324 get the LeakyRelu operator from onnx node
1325 Args:
1326 onnx_node (OnnxNode): a given onnx node
1327 operator (Operator Class): a singa operator class
1328 opset_version (int): the opset version
1329 Returns:
1330 singa operator instance
1331 """
1332 alpha = onnx_node.getattr("alpha", 0.01)
1333 return operator(alpha)
1334
1335 @classmethod
1336 def _create_reduce_ops(cls,

Callers

nothing calls this directly

Calls 1

getattrMethod · 0.80

Tested by

no test coverage detected