class_docstr: Returns triplets that form an angle greater than some threshold (angle).
  The angle is computed as defined in the angular loss paper:
  https://arxiv.org/abs/1708.01682
class_docstr_tok: ["Returns","triplets","that","form","an","angle","greater","than","some","threshold","(","angle",")",".","The","angle","is","computed","as","defined","in","the","angular","loss","paper",":","https",":","\/\/arxiv.org\/abs\/1708.01682"]
code: def set_stats(self, angles, threshold_condition):
      if self.collect_stats:
          with torch.no_grad():
              if len(angles) > 0:
                  self.average_angle = np.degrees(
                      torch.mean(angles).item()
                  )
                  self.min_angle = np.degrees(torch.min(angles).item())
                  self.max_angle = np.degrees(torch.max(angles).item())
                  self.std_of_angle = np.degrees(
                      torch.std(angles).item()
                  )
              if torch.sum(threshold_condition) > 0:
                  self.average_angle_above_threshold = np.degrees(
                      torch.mean(angles[threshold_condition]).item()
                  )
              negated_condition = ~threshold_condition
              if torch.sum(negated_condition) > 0:
                  self.average_angle_below_threshold = np.degrees(
                      torch.mean(angles[~threshold_condition]).item()
                  )
  
file_path: pytorch-metric-learning/src/pytorch_metric_learning/miners/angular_miner.py
imports: import numpy
  import torch
  from ..distances import LpDistance
  from ..utils import common_functions
  from ..utils import loss_and_miner_utils
  from .base_miner import BaseMiner
label_desc: Use image node_id 3 for calling the AngularMiner obj's underlying member method code with example usage: obj.set_stats(angles, threshold_condition) without return types