@ptrblck,
I guess I didn’t explain myself.
The net output is (N, 1) (Single Column Matrix) while the ground truth is (N) (Vector).
If you do subtraction between two PyTorch tensors of that form you get output matrix which is (N, N) -> Broadcasting happened.
Now, if you look at the code of the MSELoss 9 (Under Functional) you see it uses lambda function.
I’m asking if the lambda function is the cause no broadcasting happens in the training phase?
Moreover I ask if it is a good practice to flat out the output of single parameter regression network by return x.view(-1).