def forward(self, input, target):
    for i in range(target.shape[0]):
        if (not (torch.sum(target[i]).data.cpu().numpy() > 1)):
            target[i] = (- 1)
    input = input.squeeze(1)
    target = target.squeeze(1)
    loss = lovasz_hinge(input, target, per_image=True, ignore=(- 1))
    return loss
def forward(self, input, target):
    for i in range(target.shape[0]):
        if (not (torch.sum(target[i]).data.cpu().numpy() > 1)):
            target[i] = (- 1)
    input = input.squeeze(1)
    target = target.squeeze(1)
    loss = lovasz_hinge(input, target, per_image=True, ignore=(- 1))
    return loss