(feat)
return m_a
Compute a weight map from feature
Compute a weight map from feature
Compute a weight map from feature
def weight_from_feat(feat):
    """
    Compute a weight map from feature
    """
    feat2 = torch.pow(feat, 2)
    m_a = 1 / (1 + torch.exp(-kappa*feat2/feat2.max()  - tau))

    return m_a
def weight_from_feat ( feat ) : feat2 = torch . pow ( feat , 2 ) m_a = 1 / ( 1 + torch . exp ( - kappa * feat2 / feat2 . max ( ) - tau ) ) return m_a