SinGAN
SinGAN copied to clipboard
padd_size parameter causes dimension errors
Hi, Trying to use the padd_size parameter, does not seem to work. Example: python main_train.py --input_name=birds.png --padd_size=1
Gets the following error:
`Traceback (most recent call last):
File "main_train.py", line 29, in
File "SinGAN/SinGAN/training.py", line 39, in train z_curr,in_s,G_curr = train_single_scale(D_curr,G_curr,reals,Gs,Zs,in_s,Noise Amp,opt)
File "SinGAN/SinGAN/training.py", line 161, in train_single_scale gradient_penalty = functions.calc_gradient_penalty(netD, real, fake, opt.lam bda_grad, opt.device)
File "SinGAN/SinGAN/functions.py", line 133 , in calc_gradient_penalty interpolates = alpha * real_data + ((1 - alpha) * fake_data) RuntimeError: The size of tensor a (38) must match the size of tensor b (48) at non-singleton dimension 3 `
Is there a quick solution for this?
--padd_size control the padding of each conv-layer. because we ended up using an initial padding and not layer padding (see fig. 1 in the SM), with the current model --padd_size should be kept 0.