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

Method AddValue

tensorflow/python/compiler/xla/xla.py:256–271  ·  view source on GitHub ↗

Add `val` to the current context and its outer context recursively.

(self, val)

Source from the content-addressed store, hash-verified

254 self._outer_context.AddInnerOp(op)
255
256 def AddValue(self, val):
257 """Add `val` to the current context and its outer context recursively."""
258 if val.name in self._values:
259 # Use the real value if it comes from outer context.
260 result = self._external_values.get(val.name)
261 return val if result is None else result
262
263 result = val
264 self._values.add(val.name)
265 if self._outer_context:
266 result = self._outer_context.AddValue(val)
267 self._values.add(result.name)
268
269 self._external_values[val.name] = result
270
271 return result
272
273 def AddInnerOp(self, op):
274 self.AddOp(op)

Callers 1

AddOpMethod · 0.95

Calls 2

getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected