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

Method AddValue

tensorflow/python/tpu/tpu.py:494–509  ·  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

492 self._outer_context.AddInnerOp(op)
493
494 def AddValue(self, val):
495 """Add `val` to the current context and its outer context recursively."""
496 if val.name in self._values:
497 # Use the real value if it comes from outer context.
498 result = self._external_values.get(val.name)
499 return val if result is None else result
500
501 result = val
502 self._values.add(val.name)
503 if self._outer_context:
504 result = self._outer_context.AddValue(val)
505 self._values.add(result.name)
506
507 self._external_values[val.name] = result
508
509 return result
510
511 def AddInnerOp(self, op):
512 self.AddOp(op)

Callers 3

AddOpMethod · 0.95
AddValueMethod · 0.45
create_opMethod · 0.45

Calls 2

getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected