Hi,



 jharshraj:

nn.Linear(int((ndf*8)*(T/16)*6*6), 1),


I don’t know the size of input images but int((ndf*8)*(T/16)*6*6) is 18432 and 12288 is the size of inputs for nn.Linear. For this specific usecase, the easiest fix would be nn.Linear(12288, 1).
As a more general workaround, I recommend LazyLinear — PyTorch 1.8.0 documentation 4 if you can use v1.8