(m)
| 51 | # custom weights initialization |
| 52 | @staticmethod |
| 53 | def weights_init(m): |
| 54 | classname = m.__class__.__name__ |
| 55 | if classname.find('Conv') != -1: |
| 56 | nn.init.kaiming_normal_(m.weight.data) |
| 57 | elif classname.find('BatchNorm') != -1: |
| 58 | m.weight.data.fill_(1.) |
| 59 | m.bias.data.fill_(1e-4) |
| 60 | |
| 61 | @staticmethod |
| 62 | def build_encoder(arch='resnet50dilated', fc_dim=512, weights=''): |
nothing calls this directly
no outgoing calls
no test coverage detected