Hi
torch.autograd.gradcheck takes as input the element to call to compute the forward pass and the input.
In your case, you want:
input = torch.rand(your_input_size)
target = torch.rand(your_target_size)
save = True
res = torch.autograd.gradcheck(WeightedDiceLoss4Organs(), (input, target, save), raise_exception=False)
print(res) # res should be True if the gradients are correct.

If your gradients are not correct, you can set raise_exception to True to know which gradient was not computed properly.
Moreover, keep in mind that this check is done by finite difference and so you must give an input point around which your function is smooth to get a valid gradient check.