johann-petrak:

nobody can easily re-use the (reduction) code in that base class. My question was: why would that be a bad thing?


The idea here is that for any reasonably modern code, the re-usable part would be exactly self.reduction = reduction.
What I am trying to suggest is exactly this: New code should not provide the deprecated arguments size_average and reduction, so re-using the translation of them to then set self.reduction =  … should not be terribly interesting.
When PyTorch finally drops the support for the deprecated arguments, _Loss might go away. (Yeah, and I readily admit that there is no reason why CTCLoss should subclass _Loss when adopting this line of reasoning.)
But maybe I am not understanding this right. Given the current constraints, what would you be copy-pasting to make your code work better?
Best regards
Thomas