My solution ended up being:
from architectures import (Discriminator16, Discriminator64, Discriminator128, Generator16, Generator64, Generator128)

 # Create the Discriminator
 if ndf == 16:
   netD = Discriminator16(ngpu).to(device)
 elif ndf == 64:
   netD = Discriminator64(ngpu).to(device)
 elif ndf == 128:
   netD = Discriminator128(ngpu).to(device)
...




 ptrblck:

If you would like to call to a specific model based on a condition, you would have to store these model instances somehow, no?


Yes I was just wondering if it there was a better way of doing it. BTW you do a great job on these forums, your answers have helped me greatly!