Loss Function for Nonlinear Regression using n-Output Units

Hi,

I am using ResNet to predict a continuous output of size 100 (the output has the form of a signal with values bounded between 0 and 0.5 and the input is a 2D image).

Obviously, using the CrossEntropyLoss would not help here as I need to apply some activation function (most likely the Sigmoid) at the output layer during testing, and things will go wrong as the CrossEntropyLoss uses Softmax.

Thus, I need to use one of PyTorch loss functions to enable using the same activation function both in training and testing. I am defining an output layer of size 100, and will thus use BCEWithLogitsLoss.

Are there other alternatives?