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

Method exit_local_scope

tensorflow/python/autograph/pyct/transformer.py:266–285  ·  view source on GitHub ↗

Deprecated. Use self.state instead. Marks exit from the current local scope. Args: keep: Optional enumerable of variable names to copy into the parent scope. Returns: A dict containing the scope that has just been exited.

(self, keep=None)

Source from the content-addressed store, hash-verified

264 self._local_scope_state.append(scope_entered)
265
266 def exit_local_scope(self, keep=None):
267 """Deprecated.
268
269 Use self.state instead.
270
271 Marks exit from the current local scope.
272
273 Args:
274 keep: Optional enumerable of variable names to copy into the parent scope.
275
276 Returns:
277 A dict containing the scope that has just been exited.
278 """
279 scope_left = self._local_scope_state.pop()
280 if keep:
281 this_scope = self._local_scope_state[-1]
282 for name in keep:
283 if name in scope_left:
284 this_scope[name] = scope_left[name]
285 return scope_left
286
287 def set_local(self, name, value):
288 """Deprecated. Use self.state instead."""

Callers 4

_annotate_resultMethod · 0.80
visit_ForMethod · 0.80
_track_and_visit_loopMethod · 0.80

Calls 1

popMethod · 0.45

Tested by 2

_annotate_resultMethod · 0.64
visit_ForMethod · 0.64