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

Method definition

tensorflow/python/framework/function.py:315–330  ·  view source on GitHub ↗

Function definition proto.

(self)

Source from the content-addressed store, hash-verified

313
314 @property
315 def definition(self):
316 """Function definition proto."""
317 self._create_definition_if_needed()
318 if self._c_func:
319 with c_api_util.tf_buffer() as buf:
320 c_api.TF_FunctionToFunctionDef(self._c_func.func, buf)
321 fdef = function_pb2.FunctionDef()
322 proto_data = c_api.TF_GetBuffer(buf)
323 fdef.ParseFromString(compat.as_bytes(proto_data))
324 with ops.init_scope():
325 if context.executing_eagerly():
326 context.add_function(self._c_func.func)
327 self._function_deleter = _DefinedFunctionDeleter(
328 fdef.signature.name)
329 return fdef
330 return self._definition
331
332 @property
333 def _signature(self):

Callers

nothing calls this directly

Calls 5

executing_eagerlyMethod · 0.80
ParseFromStringMethod · 0.45
add_functionMethod · 0.45

Tested by

no test coverage detected