(self, name, value, group=None, precision=4)
Logs metric to internal dict, but with an additional option
        of grouping certain metrics together.

        Args:
            name (str): Name of metric to log.
            value (Tensor/Float): Value of the metric to log.
            group (str): Name of the group to classify different metrics together.
            precision (int): The number of floating point precision to represent the value.

        Returns:
            None
Logs metric to internal dict, but with an additional option
        of grouping certain metrics together.
Logs metric to internal dict but with an additional option of grouping certain metrics together .
def add_metric(self, name, value, group=None, precision=4):
        """
        Logs metric to internal dict, but with an additional option
        of grouping certain metrics together.

        Args:
            name (str): Name of metric to log.
            value (Tensor/Float): Value of the metric to log.
            group (str): Name of the group to classify different metrics together.
            precision (int): The number of floating point precision to represent the value.

        Returns:
            None
        """
        # Grab tensor values only
        try:
            value = value.item()
        except AttributeError:
            value = value

        self.metrics_dict[name] = dict(value=value,
                                       group=group,
                                       precision=precision)
def add_metric ( self , name , value , group = None , precision = 4 ) : # Grab tensor values only try : value = value . item ( ) except AttributeError : value = value self . metrics_dict [ name ] = dict ( value = value , group = group , precision = precision )