We don’t recommend that. Use nn.Sequential
only for trivial sequences, if you need to insert some reshaping or views, wrap it in the container. You can see how torchvision models are implemented.
6 Likes