If you want to compute the loss for all frames, the output should have the shape [batch_size=50, nb_classes=12, nb_frames=175] while the target shape is correct in this case.
I’m not sure, how your model processes the input and if you are expecting to get all frame outputs in a single tensor. If not, you would have to calculate the loss per frame by indexing the target in dim1.