I tried to print the summary of the SinGAN model, but I got an error which is:
def init_models(opt):
#generator initialization:
netG = models.GeneratorConcatSkip2CleanAdd(opt).to(opt.device)
netG.apply(models.weights_init)
if opt.netG != '':
netG.load_state_dict(torch.load(opt.netG))
summary(netG,input_size=(3, 201, 256))
print(netG)
#discriminator initialization:
netD = models.WDiscriminator(opt).to(opt.device)
netD.apply(models.weights_init)
if opt.netD != '':
netD.load_state_dict(torch.load(opt.netD))
print(netD)
return netD, netG
The problem when i add this line:
summary(netG,input_size=(3, 201, 256))
And I get the complete code from here.
So, is my way wrong? should I use a different variable as a model?