Thanks for the code.
The printing works as expected and shows that the x activation has a shape of torch.Size([32, 67275]) before being passed to self.aux_linear and self.disc_linear.
However, changing the in_features to this value won’t solve the issue, since you are using different input shapes for netD. While real_image has a shape of [batch_size, 3, 299, 299], fake_image is [batch_size, 3, 64, 64] (which would work for in_features=299 as was originally set), so you would have to resize the inputs or use an adaptive pooling layer internally and make sure the activation has the same size.