thank you for your reply, I see clearer now.
Recarding question 3:


Why would one de-average the loss only to divide later by the entire data set size? for smoothing reasons of the results?


Can the de-averaging also be done by omitting the multiplication with


inputs.size(0)

and setting the reduction parameter to ‘none’ in the loss function initialization?