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

Method get_s

python/singa/sonnx.py:2047–2060  ·  view source on GitHub ↗

get state from the node's weights or tensor_dict Args: name (str): name of the state node (ONNXNode): ONNX node tensor_dict ({}): tensor dict Returns: the states

(self, name, node, tensor_dict)

Source from the content-addressed store, hash-verified

2045 return y
2046
2047 def get_s(self, name, node, tensor_dict):
2048 """
2049 get state from the node's weights or tensor_dict
2050 Args:
2051 name (str): name of the state
2052 node (ONNXNode): ONNX node
2053 tensor_dict ({}): tensor dict
2054 Returns:
2055 the states
2056 """
2057 if name in node.attr_inputs:
2058 return tensor_dict[name]
2059 else:
2060 return self.states[name]
2061
2062 def handle_special_ops(self, node, op, tensor_dict):
2063 """

Callers 1

handle_special_opsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected