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

Method add_function_def

tensorflow/python/eager/context.py:980–992  ·  view source on GitHub ↗

Add a function definition to the context. Once added, the function (identified by its name) can be executed like any other operation. Args: fdef: A FunctionDef protocol buffer message.

(self, fdef)

Source from the content-addressed store, hash-verified

978 pywrap_tensorflow.TFE_ContextAddFunction(self._handle, fn)
979
980 def add_function_def(self, fdef):
981 """Add a function definition to the context.
982
983 Once added, the function (identified by its name) can be executed like any
984 other operation.
985
986 Args:
987 fdef: A FunctionDef protocol buffer message.
988 """
989 self.ensure_initialized()
990 fdef_string = fdef.SerializeToString()
991 pywrap_tensorflow.TFE_ContextAddFunctionDef(
992 self._handle, fdef_string, len(fdef_string))
993
994 def remove_function(self, name):
995 """Remove a function from the context.

Callers 3

add_to_graphMethod · 0.80
add_to_graphMethod · 0.80
__init__Method · 0.80

Calls 2

ensure_initializedMethod · 0.95
SerializeToStringMethod · 0.45

Tested by

no test coverage detected