CrossEntropyLoss() requires a 1-D tensor of class indices of the target (outputs in your case) but not one-hot vectors of the target.
The shape of the target should be [mini_batch_size], but in your case it happens to be [mini_batch_size,num_classes].
That is why you are getting  IndexError: Target 1 is out of bounds.
Go through the official documentation for more details(link 2.2k)