pretrained-models.pytorch
pretrained-models.pytorch copied to clipboard
[Bug fix]Data Parallel issue with types.MethodType
Problems / Bugs
- Data Parallel issue with types.MethodType #112
- The 'num_classes' is not passed to torchvision models. All models are initiated for 1000 classes even if num_classes parameter is set to other numbers. It is confusing when using this interface with torchvision models from scratch.
Fix
- Rewrite the classes for torchvision model.
- Simply pass the 'num_classes' to torchvision.models interface will fix it.