Hi. Crossentropy can support any size of input. Have you try the code?
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
criterion = nn.CrossEntropyLoss().to(device)
loss = criterion(output, label_batch)