The label mask is only used in cases where you have a sequence output.
As you can see the sentiment example uses an RnnOutputLayer, that means that it has an output at each timestep. In this example we only have a label for the last step, so we have to mask out all the other steps.
In contrast to that the cnn sentence classification example is using an OutputLayer, that means it will only output a single result. In this case we don’t need a label mask, because there is nothing to mask out.