lucidrains / lambda-networks

Implementation of LambdaNetworks, a new approach to image recognition that reaches SOTA with less compute
MIT License
1.53k stars 157 forks source link

Lambda Layer for Multiscale Training #19

Open lufanma opened 3 years ago

lufanma commented 3 years ago

Does Lambda Layer support multiscale training, it seems like that you have to specify n?

lucidrains commented 3 years ago

@Lufan111 if you mean whether you can train a lambda layer to be agnostic to the image size, you will want to use the version with the localized context (keyword r)

lufanma commented 3 years ago

@Lufan111 if you mean whether you can train a lambda layer to be agnostic to the image size, you will want to use the version with the localized context (keyword r)

Thanks for reply. Well, I mean if I can use the global context version for different image sizes while multiscale training, since the H*W is actually different per batch. Does the current code version support this?

lucidrains commented 3 years ago

@Lufan111 it won't work for global context if the images differ in size across batches, only for local context

lufanma commented 3 years ago

@Lufan111 it won't work for global context if the images differ in size across batches, only for local context

Okay~ I see... As for Appendix D "Experimental Details" COCO object detection part, "apply multi-scale jitter of [0.1, 2.0] during training", so you just use different arg 'r' for local context right? not for multi-scale global images?

lucidrains commented 3 years ago

@Lufan111 yup, so if you look at the beginning of Appendix D, the author(s) detail the architecture they settled on. they use a local context of 23x23 unless if the intra-depth dimension is greater than 1, in which case they lower that to 7x7