(self)
| 752 | |
| 753 | @property |
| 754 | def op(self): |
| 755 | # We want cross-replica code that does some var.op.X calls |
| 756 | # to work (even if the current device isn't in self.devices), but |
| 757 | # other uses of var.op in a cross-replica context to fail. |
| 758 | if distribution_strategy_context.in_cross_replica_context(): |
| 759 | return DistributedVarOp(self.primary.op.name, |
| 760 | self.primary.op.graph, |
| 761 | self.primary.op.traceback, |
| 762 | self.primary.op.type) |
| 763 | return self.get().op |
| 764 | |
| 765 | @property |
| 766 | def _in_graph_mode(self): |