(self, sublinear=False)
| 17 | self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0] |
| 18 | |
| 19 | def get_model(self, sublinear=False): |
| 20 | def init_yolo(M): |
| 21 | for m in M.modules(): |
| 22 | if isinstance(m, nn.BatchNorm2d): |
| 23 | m.eps = 1e-3 |
| 24 | m.momentum = 0.03 |
| 25 | if "model" not in self.__dict__: |
| 26 | from yolox.models import YOLOX, YOLOFPN, YOLOXHead |
| 27 | backbone = YOLOFPN() |
| 28 | head = YOLOXHead(self.num_classes, self.width, in_channels=[128, 256, 512], act="lrelu") |
| 29 | self.model = YOLOX(backbone, head) |
| 30 | self.model.apply(init_yolo) |
| 31 | self.model.head.initialize_biases(1e-2) |
| 32 | |
| 33 | return self.model |
| 34 | |
| 35 | def get_data_loader(self, batch_size, is_distributed, no_aug=False): |
| 36 | from data.datasets.cocodataset import COCODataset |
nothing calls this directly
no test coverage detected