YuHengsss / YOLOV

This repo is an implementation of PyTorch version YOLOV Series
Apache License 2.0
283 stars 39 forks source link

BN freeze #28

Closed ResonWang closed 1 year ago

ResonWang commented 1 year ago

Dear author, I noticed the following code:

def fix_bn(m):

    #     classname = m.__class__.__name__
    #     if classname.find('BatchNorm') != -1:
    #         m.eval()
    self.model.apply(init_yolo)
    # self.model.apply(fix_bn)

In your experiments, is there big difference between self.model.apply(init_yolo) and self.model.apply(fix_bn) ?

YuHengsss commented 1 year ago

self.model.apply(init_yolo) has no effect on the vid model for we will load pretrain-weights. In our experiment, fix_bn could make training more stable. But we find its performance varies for different detectors and datasets.