def cal_loss(y_true, y_pred, device):
    (y_true, y_pred) = (y_true.flatten(), y_pred.flatten())
    y_mask = torch.where((y_true != 0.0), torch.full_like(y_true, 1), torch.full_like(y_true, 0))
    loss = (torch.sum((torch.abs((y_true - y_pred)) * y_mask)) / torch.sum(y_mask))
    return loss
def cal_loss(y_true, y_pred, device):
    (y_true, y_pred) = (y_true.flatten(), y_pred.flatten())
    y_mask = torch.where((y_true != 0.0), torch.full_like(y_true, 1), torch.full_like(y_true, 0))
    loss = (torch.sum((torch.abs((y_true - y_pred)) * y_mask)) / torch.sum(y_mask))
    return loss