jiangtaoxie / fast-MPN-COV

@CVPR2018: Efficient unrolling iterative matrix square-root normalized ConvNets, implemented by PyTorch (and code of B-CNN,Compact bilinear pooling etc.) for training from scratch & finetuning.
http://peihuali.org/iSQRT-COV/index.html
MIT License
270 stars 56 forks source link

fine tune issue #13

Closed abcdvzz closed 5 years ago

abcdvzz commented 5 years ago

When I ran finetune.sh in ./finetune/, I recognized that when finetuning, the training process didn't apply the forward function in mpnconvresnet.py instead applied the forward function in base.py? So it ignores the following operations in mpnconvresnet.py if I am right: x = MPNCOV.CovpoolLayer(x) x = MPNCOV.SqrtmLayer(x, 5) x = MPNCOV.TriuvecLayer(x) why?

jiangtaoxie commented 5 years ago

That's right. base.py reconstructs the model, so we can easily replace the original image reprensentation method of mpncovresnet or other networks to another one.(e.g., GAvP, BCNN, etc.).

abcdvzz commented 5 years ago

But I just want to train the fgvc model with mpncovresnet method. So in your code, pretrain model is trained with mpncovresnet method on Imagenet. When finetuning on the CUB dataset, mpncovresnet method is not necessary anymore? Am I right?

abcdvzz commented 5 years ago

But I just want to train the fgvc model with mpncovresnet method. So in your code, pretrain model is trained with mpncovresnet method on Imagenet. When finetuning on the CUB dataset, mpncovresnet method is not necessary anymore? Am I right?

I mean the following code is not necessary anymore? x = MPNCOV.CovpoolLayer(x) x = MPNCOV.SqrtmLayer(x, 5) x = MPNCOV.TriuvecLayer(x)

jiangtaoxie commented 5 years ago

Nonono, The MPN-COV still exists in pretrained model. A same module is reload in model_init.py.