class_docstr: Implementation of https://arxiv.org/pdf/1612.02295.pdf
class_docstr_tok: ["Implementation","of","https",":","\/\/arxiv.org\/pdf\/1612.02295.pdf"]
code: def modify_cosine_of_target_classes(self, cosine_of_target_classes):
      cos_with_margin = self.get_cos_with_margin(
          cosine_of_target_classes
      )
      angles = self.get_angles(cosine_of_target_classes)
      with torch.no_grad():
          k = (
              angles / (math.pi / self.margin)
          ).floor()  # Equation 6: angles needs to be between [k*pi/m and (k+1)*pi/m]
      return ((-1) ** k) * cos_with_margin - (2 * k)
  
imports: import math
  import numpy
  import scipy.special
  import torch
  from ..distances import CosineSimilarity
  from ..utils import common_functions
  from ..utils import loss_and_miner_utils
  from .base_metric_loss_function import BaseMetricLossFunction
  from .mixins import WeightRegularizerMixin
label_desc: Use image node_id 7 for calling the LargeMarginSoftmaxLoss obj's underlying member method code with example usage: obj.modify_cosine_of_target_classes(cosine_of_target_classes) and returns: unknown