KunpengLi1994 / VSRN

PyTorch code for ICCV'19 paper "Visual Semantic Reasoning for Image-Text Matching"
288 stars 47 forks source link

A question about the l2norm #7

Closed woodfrog closed 4 years ago

woodfrog commented 4 years ago

Hi Kunpeng,

Nice work, and thank you for sharing the code!

Just a question about the l2-norm in the code: It seems that all the l2-norms are applied to the first dimension (for example, this line). But when the tensor shape is something like 128 x 36 x 2048, should the normalization be applied to dim 2? Do you have particular concerns on this, or it might be a bug?

Thanks!

KunpengLi1994 commented 4 years ago

Hi,

Thanks for your interest in our work and your suggestions!

I agree with you, l2-norm on dim 2 should be more reasonable. Worth to try by revising Ln 238 and Ln 250.

woodfrog commented 4 years ago

Thanks for the reply! Yes, I guess your results might get better after revising L238 and L250.