Dami_Mi:

MSELoss


For MSELoss, the output and target (label_data in your case) must be of same shape. You are likely looking for CrossEntropyLoss.
By the way, your question has nothing to do with the original post. So you should post a new thread instead replying in here. Further more, the error message is quite clear in your case, you might be able to solve such issues faster if you think about the message and consult the doc in future…