Hi!
Thank you very much for your quick reply. Yes, I understand that, my point would rather be this question:

Does moving the pooling layer from the model definition (in the constructor) to the forward method bring any advantage in terms of memory consumption?

I guess this is probably a silly question (and the answer is no). I was just asking because if you look at the output from torchsummary that I was showing in my previous post, this would mean that the memory estimates that torchsummary gives are misleading in this case, and the memory consumed by both “models” would be exactly the same?
Thanks!
Adrian
P.S.: While I have you here, may I also ask if there is any simple way of measuring/estimating the memory spent by a model in Pytorch while doing a forward/backward pass? Thanks