I cannot alter the original module definitions because I am implementing a tool that has to accept any popular backbone structures like ResNet, googleNet, denseNet, etc.
Luckily, I have successfully indirectly figured out shapes of inputs and outputs of functional calls by recursively searching in torch.fx.graph.Graph. But thank you anyway.