Kenel_size in conv2d

Conv2d(1024,256,kenel_size=(1,3)[flag])
in this line kenel_size=(1,3)[flag] , what does it mean , what is mean of flag

please help me I have found this in SSD model code

Post a link to the source code and it will be easier to answer you question. The kernel_size=(1,3) means that the shape of the kernel is height=1, width=3. Look at the docs for more info

here u can find the code --------------- https://github.com/amdegroot/ssd.pytorch/blob/8dd38657a3b1df98df26cf18be9671647905c2a0/ssd.py#L160

It’s just a way for them to either set the kernel size to 1 or 3 depending on what the flag variable is. I think that it’s a weird and not very readable way to do this but oh well

flag

1 Like