snowe:

Is there a similar way to access the order of execution in the forward method then?


Not a beautiful approach, but you could register forward hooks for each layer and print its name when it’s called.
Based on the output you would see which layer was called first in this execution.
Note that this is also not a bulletproof approach, as your forward might have conditions, loops, etc. which can change during the runtime.
I guess for the majority of models you might be find to iterate model.named_modules() or .named_children(), filter using if isinstance(module, nn.Conv2d) and print the first occurrence.