Wrapping the submodules into an nn.Sequential
container works for models which only use nn.Module
s and no functional API calls and initialize them in a sequential manner.
In your use case you would lose all functional calls used in the original forward
method as seen here.
1 Like