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

Method __del__

tensorflow/python/framework/function.py:201–214  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

199 self.name = name
200
201 def __del__(self):
202 try:
203 context.remove_function(self.name)
204 except TypeError:
205 # Suppress some exceptions, mainly for the case when we're running on
206 # module deletion. Things that can go wrong include the context module
207 # already being unloaded, self._handle._handle_data no longer being
208 # valid, and so on. Printing warnings in these cases is silly
209 # (exceptions raised from __del__ are printed as warnings to stderr).
210 pass # 'NoneType' object is not callable when the handle has been
211 # partially unloaded.
212 except AttributeError:
213 pass # 'NoneType' object has no attribute 'eager_mode' when context has
214 # been unloaded. Will catch other module unloads as well.
215
216
217class _DefinedFunction(object):

Callers

nothing calls this directly

Calls 1

remove_functionMethod · 0.80

Tested by

no test coverage detected