(self)
| 709 | |
| 710 | @property |
| 711 | def handle(self): |
| 712 | device = None |
| 713 | replica_context = distribution_strategy_context.get_replica_context() |
| 714 | if replica_context is None: |
| 715 | device = distribute_lib.get_update_device() |
| 716 | if device is None: |
| 717 | raise ValueError("`handle` is not available outside the replica context" |
| 718 | " or a `tf.distribute.Strategy.update()` call.") |
| 719 | return self.get(device=device).handle |
| 720 | |
| 721 | def eval(self, session=None): |
| 722 | return self._get_closest().eval(session) |