The documentation for nn.CrossEntropyLoss states
The input is expected to contain scores for each class.
input has to be a 2D Tensor of size (minibatch, C).
This criterion expects a class index (0 to C-1) as the target for each value of a 1D tensor of size minibatch

However the following code appears to work:
loss = nn.CrossEntropyLoss()
input = torch.randn(15, 3, 10)
input = Variable(input, requires_grad=True)
target = torch.LongTensor(15,10).random_(3)
target = Variable(target)
output = loss(input, target)

So my input is a 3D tensor and my targets is a 2D tensor.
Am I right in thinking that CrossEntropyLoss is interpreting my input as minibatch, N_CLASSES, SEQ_LEN and my targets as minibatch, SEQ_LEN?
The reason I am trying to do this is that I am doing multiclass classification, each element of my minibatch is a sequence of 10 elements which can be classified into one of 3 classes.