It’s not really necessary.
It’s all about how pytorch is structured. Classes calls in the enf functionals which are functions with no kwargs but only args whose signature is c++.
So they just follow that convention.
Another reason is that some class may have weighting schemes and if they are defined as classes (nn.Modules) they can be allocated on cuda easily and recursively.