I was trying to read up on some seq to seq models for translation, and i saw that in a very common model, the loss was used as cross entropy loss and the way it was used was
dimension sizes ->
trg = [(trg sent len - 1) * batch size]
output = [(trg sent len - 1) * batch size, output dim]

where the output dim was the target vocab size. now my question is how is this loss working given the dimensions are not equal, what is it computing and how it is computing?
my one theory is that they perform output.argmax(1) and then compute the loss.