Will there be any performance/memory/other difference if I do the following to create a model:
- using nested modules (for example, if I make Conv-BN-ReLU a module, which is nested in a Residual Module, which is nested in a stage module, which is nested in a body module, which is nested in the module of the whole model) vs. writing all layers inside a single module without nesting
- using Sequential vs Functional api (assuming no branching)
- putting simple operations like add, scaling, etc. into a custom module and using the custom module as a layer vs directly adding the tensor in forward
Any help would be great. Thanks in advance