Ejemplo n.º 1
0
 def __call__(self, tensors: Dict[str, tf.Tensor]) -> Dict[str, Tuple]:
     tensors = base.get_scalars(tensors,
                                names=self.tensors,
                                pattern=self.pattern)
     return {
         name: decay_mean_metric(value, self.decay, name)
         for name, value in tensors.items()
     }
Ejemplo n.º 2
0
 def __call__(self, tensors: Dict[str, tf.Tensor]) -> Dict[str, Tuple]:
     tensors = base.get_scalars(tensors,
                                names=self.tensors,
                                pattern=self.pattern)
     return {
         name: tf.compat.v1.metrics.mean(value)
         for name, value in tensors.items()
     }
Ejemplo n.º 3
0
 def __call__(self, tensors: Dict[str, tf.Tensor]) -> Dict[str, Tuple]:
     tensors = base.get_scalars(tensors,
                                names=self.tensors,
                                pattern=self.pattern)
     LOGGER.info(f"{self} -> {', '.join(tensors.keys())}")
     return {
         name: max_value_metric(value, name)
         for name, value in tensors.items()
     }
Ejemplo n.º 4
0
 def __call__(self, tensors: Dict[str, tf.Tensor]) -> Dict[str, Tuple]:
     tensors = base.get_scalars(tensors, names=self.tensors, pattern=self.pattern)
     LOGGER.info(f"{self} -> {', '.join(tensors.keys())}")
     return {name: (tensor, tf.no_op()) for name, tensor in tensors.items()}