Based on BCELoss 49 documentation, it seems if you set reduction ='none', you will get your output.
And as you mentioned in your question, the BCELoss averages, because the default value of reduction is mean.
So here is the code you should use:
criterion = BCELoss(reduction='none')