def forward(self, input: torch.Tensor, target: torch.Tensor):
    if self.onehot:
        target = target.argmax(dim=(- 1))
    loss = F.cross_entropy(input, target, reduction=self.reduction)
    return loss
def forward(self, input: torch.Tensor, target: torch.Tensor):
    if self.onehot:
        target = target.argmax(dim=(- 1))
    loss = F.cross_entropy(input, target, reduction=self.reduction)
    return loss