sefibk / KernelGAN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get final kernel size

ningbende opened this issue · comments

commented

Thanks for you excellent work!
I have a problem here.
when the config G_kernel_size=13, I get the final Kernel size 17x17
when the config G_kernel_size=11, the code get error,
How can I get the right Kernel size?

Hi,
sorry for the bad coding\documentation. The implementation of this argument is very unclear.
G_kernel_size should not be changed unless you also change G's architecture.
The size of the kernel is determined by G's architecture: 7,5,3,1,1,1 = a kernel of size 13.
=> if you run with default setting (without changing the configs) you should get a kernel of size 13. If you are interested in different size kernels - let me know and I will explain

commented

Thanks for your reply.

commented

I have set self.conf.G_structure = [5, 3, 3, 1, 1, 1] to get kernel size 11.

That will result with a kernel size of 9.
Each layer (after the 1st) adds (num - 1) to the kernel's size.
=> if you choose this structure - set G_kernel_size to 9 and it should work.
for size 11 I would set the architecture either [5,3,3,3,1,1] or [7,3,3,1,1,1]

commented

yeah, I make a mistake. Thank you for your reply!

With the config G_kernel_size=13, I also get the final Kernel size 17x17.
I didn't change anything and run it with default setting.
I want to know where the mistake is. Thanks a lot!

How to you examine the kernel?
did you use the .mat file in Matlab?