Cadene / Cadene/pretrained-models.pytorch
Data Parallel issue with types.MethodType
- Dominant language
- Python
- Stars
- 9.1k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
I found that when using nn.data_parallel along with this library, there will be issues during model forward on multi-GPU as when modifying torch vision network (such as in modify_resnets function) types.MethodType bound model instance on GPU 0, so when forward is called on GPU 1, model and input will be located on different GPUs and thus lead to errors.
Using the original way of bounding function to class instead of instance seems to solve this issue, but may suffer from other problem as in #71. Is there any way to fix this issue without introducing another?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.