Calling super's forward() method
问题 What is the most appropriate way to call the forward() method of a parent Module ? For example, if I subclass the nn.Linear module, I might do the following class LinearWithOtherStuff(nn.Linear): def forward(self, x): y = super(Linear, self).forward(x) z = do_other_stuff(y) return z However, the docs say not to call the forward() method directly: Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since