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() }
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() }
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() }
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()}