Question about the gradient of nll loss

Would you tell me once the arg of ignore_index is assigned, what is the gradient of that sample would be, 1 or 0 ?

I figured it out, it should be 0, since the ignored samples should have no contribution to the training procedures.