(model_name="RegNetX_200MF", num_classes=1000)
| 286 | |
| 287 | |
| 288 | def create_regnet(model_name="RegNetX_200MF", num_classes=1000): |
| 289 | model_name = model_name.lower().replace("-", "_") |
| 290 | if model_name not in model_cfgs.keys(): |
| 291 | print("support model name: \n{}".format("\n".join(model_cfgs.keys()))) |
| 292 | raise KeyError("not support model name: {}".format(model_name)) |
| 293 | |
| 294 | model = RegNet(cfg=model_cfgs[model_name], num_classes=num_classes) |
| 295 | return model |
| 296 |