def METHOD_NAME(self, embbedings, label):
    norms = paddle.norm(embbedings, 2, 1, True)
    embbedings = paddle.divide(embbedings, norms)
    kernel_norm = l2_norm(self.kernel, axis=0)
    cosine = paddle.mm(embbedings, kernel_norm)
    cosine = paddle.clip(cosine, -1 + self.eps,
                         1 - self.eps)  # for stability
    safe_norms = paddle.clip(norms, min=0.001, max=100)  # for stability
    safe_norms = safe_norms.clone().detach()
    # update batchmean batchstd
    with paddle.no_grad():
        mean = safe_norms.mean().detach()
        std = safe_norms.std().detach()
        self.batch_mean = mean * self.t_alpha + (1 - self.t_alpha
                                                 ) * self.batch_mean
        self.batch_std = std * self.t_alpha + (1 - self.t_alpha
                                               ) * self.batch_std
    margin_scaler = (safe_norms - self.batch_mean) / (
        self.batch_std + self.eps)  # 66% between -1, 1
    margin_scaler = margin_scaler * self.h  # 68% between -0.333 ,0.333 when h:0.333
    margin_scaler = paddle.clip(margin_scaler, -1, 1)
    # g_angular
    m_arc = paddle.nn.functional.one_hot(
        label.reshape([-1]), self.classnum)
    g_angular = self.m * margin_scaler * -1
    m_arc = m_arc * g_angular
    theta = paddle.acos(cosine)
    theta_m = paddle.clip(
        theta + m_arc, min=self.eps, max=math.pi - self.eps)
    cosine = paddle.cos(theta_m)
    # g_additive
    m_cos = paddle.nn.functional.one_hot(
        label.reshape([-1]), self.classnum)
    g_add = self.m + (self.m * margin_scaler)
    m_cos = m_cos * g_add
    cosine = cosine - m_cos
    # scale
    scaled_cosine_m = cosine * self.s
    return scaled_cosine_m