Aryan_Asadian:

Also, I found that when I pass some data points, the whole model does not produce output, i.e., if I feed my model with a batch of data (32,3,224,224), the output is the same size. any help is appreciated.


This is expected, since the forward method was never changed.
Even though you were adding valid modules via add_module to empty_model, they will never be used in:
    def forward(self, x):
        return x