How can I reach Torch m.output in Pytorch?

I try to replicate the net2net torch code in pytorch and here where I stuck. It uses m.output to reach the last feedforward state to compute BatchNorm statistics but as far as I see, it is not possible in Pytorch. Do you have any other alternative method that you might like to suggest? especially @smth

this is not possible in pytorch. In pytorch, you might want to implement net2net as a utility function, that the user explicitly uses in their program. It’ll take weights of a Conv2d layer (or Linear layer) and return a new Conv2d layer that’s wider, or a Sequential of 2 Conv2d layers.

that’s exactly what I decided to do thx.