Why don’t you want using nn.Module ? You have full control on what happens. For CNN you have to build on a Module because you can’t have in the same nn.Sequential Conv and Linear (except is you use a custom Flatten  layer). The PyTorch example 42 speaks by itself. Just change the layers, the activations (which can be layers too).