Thanks for your kindly reply.
Well, it is indeed a code snippet from my project here. I want to replace ResNet with different backbones like SeNet. To improve code quality, I don’t want to add a new class member or “if else”. So I tried to use template. The class implementations can be find here 2.