Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have error when growing network[32x32 to 64x64] #27

Open
szupzp opened this issue Mar 8, 2018 · 2 comments
Open

have error when growing network[32x32 to 64x64] #27

szupzp opened this issue Mar 8, 2018 · 2 comments

Comments

@szupzp
Copy link
Contributor

szupzp commented Mar 8, 2018

I train another data set which is cell Pathological image,and it doesn‘t work well.I set the --trns_tick to 80 and --stab_tick to 40 because my data set is very small and other config is default.when the training is begining to grow network from 32x32 to 64x64,the program is stop and point out a error :
Traceback (most recent call last):
File "trainer.py", line 352, in
trainer.train()
File "trainer.py", line 258, in train
self.resl_scheduler()
File "trainer.py", line 150, in resl_scheduler
self.G.module.grow_network(floor(self.resl))
File "/media/sdc/zhanpeng/PycharmProjects/GAN/PG_GAN/pggan-pytorch/network.py", line 142, in grow_network
inter_block, ndim, self.layer_name = self.intermediate_block(resl)
File "/media/sdc/zhanpeng/PycharmProjects/GAN/PG_GAN/pggan-pytorch/network.py", line 105, in intermediate_block
layers = deconv(layers, ndim*2, ndim, 3, 1, 1, self.flag_leaky, self.flag_bn, self.flag_wn, self.flag_pixelwise)
File "/media/sdc/zhanpeng/PycharmProjects/GAN/PG_GAN/pggan-pytorch/network.py", line 13, in deconv
if wn: layers.append(equalized_conv2d(c_in, c_out, k_size, stride, pad))
File "/media/sdc/zhanpeng/PycharmProjects/GAN/PG_GAN/pggan-pytorch/custom_layers.py", line 103, in init
self.conv = nn.Conv2d(c_in, c_out, k_size, stride, pad, bias=False)
File "/home/panzhanpeng/sdc_link/anaconda3/lib/python3.5/site-packages/torch/nn/modules/conv.py", line 273, in init
False, _pair(0), groups, bias)
File "/home/panzhanpeng/sdc_link/anaconda3/lib/python3.5/site-packages/torch/nn/modules/conv.py", line 33, in init
out_channels, in_channels // groups, *kernel_size))

TypeError: torch.cuda.FloatTensor constructor received an invalid combination of arguments - got (float, float, int, int), but expected one of:
* no arguments
* (int ...)
didn't match because some of the arguments have invalid types: (float, float, int, int)
* (torch.cuda.FloatTensor viewed_tensor)
* (torch.Size size)
* (torch.cuda.FloatStorage data)
* (Sequence data)

so what should i do?how to improve the network?

@szupzp szupzp changed the title have errer when growing network[32x32 to 64x64] have error when growing network[32x32 to 64x64] Mar 8, 2018
@szupzp
Copy link
Contributor Author

szupzp commented Mar 8, 2018

I solved the problem by modify the code,please see :#28

@fatLime
Copy link

fatLime commented Sep 18, 2019

Hello zhanpengpan, I am also training my custom dataset. Could you tell me how large your dataset is? And how is your --TICK set? Still 1000?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants