Hi,
All models and loss functions assume that the first dimension is the batch size. So the first input to cross entropy should be batch_size x nb_classes and the second batch_size (and contain values between 0 and nb_classes-1).