MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _set_attr

Method _set_attr

tensorflow/python/framework/ops.py:2321–2330  ·  view source on GitHub ↗

Private method used to set an attribute in the node_def.

(self, attr_name, attr_value)

Source from the content-addressed store, hash-verified

2319 self._traceback, include_func_start_lineno=True)
2320
2321 def _set_attr(self, attr_name, attr_value):
2322 """Private method used to set an attribute in the node_def."""
2323 buf = c_api.TF_NewBufferFromString(
2324 compat.as_bytes(attr_value.SerializeToString()))
2325 try:
2326 # pylint: disable=protected-access
2327 c_api.SetAttr(self._graph._c_graph, self._c_op, attr_name, buf)
2328 # pylint: enable=protected-access
2329 finally:
2330 c_api.TF_DeleteBuffer(buf)
2331
2332 def _set_func_attr(self, attr_name, func_name):
2333 """Private method used to set a function attribute in the node_def."""

Callers 15

_set_func_attrMethod · 0.95
_set_func_list_attrMethod · 0.95
_set_type_list_attrMethod · 0.95
_set_shape_list_attrMethod · 0.95
optimizeFunction · 0.80
setUpMethod · 0.80
_GetLayerMatchFunction · 0.80
AddOpMethod · 0.80
RunMethod · 0.80

Calls 1

SerializeToStringMethod · 0.45

Tested by 6

setUpMethod · 0.64
RunMethod · 0.64
RunMethod · 0.64
testSetAttrMethod · 0.64
testSimpleSwapMethod · 0.64
_annotated_graphMethod · 0.64