Open yichengsu opened 4 years ago
Q1: https://github.com/toandaominh1997/EfficientDet.Pytorch/blob/master/models/efficientdet.py#L33-L53
self.backbone = EfficientNet.from_pretrained(MODEL_MAP[network]) ... for m in self.modules(): if isinstance(m, nn.Conv2d): n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels m.weight.data.normal_(0, math.sqrt(2. / n)) elif isinstance(m, nn.BatchNorm2d): m.weight.data.fill_(1) m.bias.data.zero_()
Why use a pretrained model and then reset all the parameters? Training from scratch?
Q2: self.is_training = is_training? nn.Module already has a 'training' attribute. In your code, is_training is almost as same as 'training'.
self.is_training = is_training
nn.Module
is_training
Q3: https://github.com/toandaominh1997/EfficientDet.Pytorch/blob/master/train.py#L102 model.module.freeze_bn() freeze BN in training? Are you serious?
model.module.freeze_bn()
Q1: https://github.com/toandaominh1997/EfficientDet.Pytorch/blob/master/models/efficientdet.py#L33-L53
Why use a pretrained model and then reset all the parameters? Training from scratch?
Q2:
self.is_training = is_training
?nn.Module
already has a 'training' attribute. In your code,is_training
is almost as same as 'training'.Q3: https://github.com/toandaominh1997/EfficientDet.Pytorch/blob/master/train.py#L102
model.module.freeze_bn()
freeze BN in training? Are you serious?