jiaxiang-cheng/PyTorch-CNN-for-RUL-Prediction

Use Mean-Square Error as objective

boom85423 opened this issue · 1 comments

I wonder why you use cross-entropy loss rather than mean-square loss for a regression problem? Have you compared the difference? thanks a lot !

I wonder why you use cross-entropy loss rather than mean-square loss for a regression problem? Have you compared the difference? thanks a lot !

Thanks for bringing up this point. I indeed tested both ways to check the performance. Seems cross-entropy loss works better with this model, and accordingly the outputs will be different cuz in this case it will be a classification problem rather than a regression problem. If you are interested you can simply change the output layer with a scalar then train with mse loss.