princewang1994 / R-FCN.pytorch

A Pytorch Implementation of R-FCN/CoupleNet
MIT License
64 stars 18 forks source link

fix blocks #3

Closed liuqk3 closed 6 years ago

liuqk3 commented 6 years ago

@princewang1994 , Hi, thanks for your code firstly, but I found the conv1 andconv2_x (the block1, i.e. the layer1 in Pytorch implementation) of ResNet if fixed when it is used as the base rcnn of RFCN model. And I'm wondering what the purpose of such default configuration is. For a quicker convergence or a better performance?

princewang1994 commented 6 years ago

@liuqk3 Thanks, this repo(rfcn/couplenet) is modified from the jwyang's faster-rcnn.pytorch. In his implementation, fixing layer1 and conv1 is the default setting, and I had tried to unfreeze these layers when I reproduced faster-rcnn, experiments shows that there is no performance gain by setting them free, converging needs even more epochs. So I kept it untouched in my R-FCN/CoupleNet implement. BTW, if you are interesting in tuning this hyper parameter, you can change the config in lib/model/utils/config.py, by setting __C.RESNET.FIXED_BLOCKS = N, hope this can help you.

liuqk3 commented 6 years ago

@princewang1994 Thanks for your reply, here is another question:) You uploaded the pretrained resnet101_caffe.pth in the issue psroi can use rightly? of this repo, is the pretrained model the origin resnet101 trained using caffe? If so, why not load the pretrained model by the function model.load_state_dict(model_zoo.load_url(model_urls['resnet101'])) from the model zoo directly?

princewang1994 commented 6 years ago

It seems that using model_zoo.load_url is equal with loading pth file locally after downloading from url, both ways are ok. This weight is pretrained on ImageNet, which referes to the other repo.

foralliance commented 5 years ago

@liuqk3 @princewang1994 HI resnet101_caffe.pth is the caffe model, model_zoo.load_url is the pytorch model. I don't think they're the same