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

Method add_op

tensorflow/python/framework/op_def_library.py:292–301  ·  view source on GitHub ↗

Register an OpDef. May call apply_op with the name afterwards.

(self, op_def)

Source from the content-addressed store, hash-verified

290
291 # pylint: disable=invalid-name
292 def add_op(self, op_def):
293 """Register an OpDef. May call apply_op with the name afterwards."""
294 if not isinstance(op_def, op_def_pb2.OpDef):
295 raise TypeError("%s is %s, not an op_def_pb2.OpDef" %
296 (op_def, type(op_def)))
297 if not op_def.name:
298 raise ValueError("%s missing name." % op_def)
299 if op_def.name in self._ops:
300 raise RuntimeError("Op name %s registered twice." % op_def.name)
301 self._ops[op_def.name] = _OpInfo(op_def)
302
303 def add_op_list(self, op_list):
304 """Register the OpDefs from an OpList."""

Callers 13

add_op_listMethod · 0.95
_add_opMethod · 0.45
_add_opMethod · 0.45
AddNewOpToHistoryFunction · 0.45
ReadOpHistoryFunction · 0.45
ValidateCompatibleMethod · 0.45
StrippedOpListForGraphFunction · 0.45
LoadLibraryFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
CreateApiDefFunction · 0.45
TESTFunction · 0.45

Calls 2

typeFunction · 0.85
_OpInfoClass · 0.85

Tested by 5

_add_opMethod · 0.36
_add_opMethod · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36