In the linked tutorial outputs[:5] seems to have values of
tensor([1, 0, 1, 0, 0])

which is a LongTensor with class indices for two classes, while your train_outputs tensor shows floating point values, which will not work.
Could you compare your code to the tutorial again and make sure to use the right tensor as the target?