def __init__(self, reduction='mean', onehot=False):
    super().__init__()
    self.reduction = reduction
    self.onehot = onehot
def __init__(self, reduction='mean', onehot=False):
    super().__init__()
    self.reduction = reduction
    self.onehot = onehot