def METHOD_NAME(self, dtype=torch.float):
    if not torch.cuda.is_available():
        return
    from mmcv.ops import softmax_focal_loss
    alpha = 0.25
    gamma = 2.0
    for case, output in zip(inputs, softmax_outputs):
        np_x = np.array(case[0])
        np_y = np.array(case[1])
        np_x_grad = np.array(output[1])
        x = torch.from_numpy(np_x).cuda().type(dtype)
        x.requires_grad_()
        y = torch.from_numpy(np_y).cuda().long()
        loss = softmax_focal_loss(x, y, gamma, alpha, None, 'mean')
        loss.backward()
        assert np.allclose(loss.data.cpu().numpy(), output[0], 1e-2)
        assert np.allclose(x.grad.data.cpu(), np_x_grad, 1e-2)