(self, op, gradient_uid,
ignore_existing=False)
| 4233 | |
| 4234 | @tf_contextlib.contextmanager |
| 4235 | def _colocate_with_for_gradient(self, op, gradient_uid, |
| 4236 | ignore_existing=False): |
| 4237 | with self.colocate_with(op, ignore_existing): |
| 4238 | if gradient_uid is not None and self._control_flow_context is not None: |
| 4239 | self._control_flow_context.EnterGradientColocation(op, gradient_uid) |
| 4240 | try: |
| 4241 | yield |
| 4242 | finally: |
| 4243 | self._control_flow_context.ExitGradientColocation(op, gradient_uid) |
| 4244 | else: |
| 4245 | yield |
| 4246 | |
| 4247 | @tf_contextlib.contextmanager |
| 4248 | def colocate_with(self, op, ignore_existing=False): |
no test coverage detected