In graph mode returns the result Tensor while in eager the callable.
(self)
| 215 | raise NotImplementedError("Metrics must define a result() member function") |
| 216 | |
| 217 | def value(self): |
| 218 | """In graph mode returns the result Tensor while in eager the callable.""" |
| 219 | if context.executing_eagerly(): |
| 220 | return self.result |
| 221 | else: |
| 222 | return self.result() |
| 223 | |
| 224 | # We can support two different strategies of for doing data-parallel |
| 225 | # distributed metric computations: |