detectron使用mask rcnn的AffineChannel layer进行freeze

转载链接:https://github.com/facebookresearch/Detectron/issues/586

lsrock1提到了,在resnet.py中使用了stopgradient 来进行对于该层开始之前的层进行freeze,但是不能freeze某一个特定的层

zeenolife 回答:

There is a method TrainableParams() in DetectionModelHelper class in detectron/modeling/detector.pywhich returns all trainable params. It depends on self.do_not_update_params list, so you can actually somehow append your param names to it manually and that would effectively freeze the weight. That might help.

猜你喜欢

转载自blog.csdn.net/mdjxy63/article/details/82820408