zhanghang1989 / zhanghang1989/PyTorch-Encoding
GPU 的一些问题
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2k
- Forks
- 448
- PR merge metrics
- No merged PRs in 30d
Description
作者您好
前阵子因为环境问题执行不了 (现在可以了)
但发现有些问题
首先我利用
model = encoding.models.get_model('DeepLab_ResNeSt50_ADE', pretrained=True)
是可以训练的,但训练完的模型要做test时却出现以下错误
model = torch.load(str(model))

改成以下
model = torch.load(str(model), map_location='cuda:0')
是可以执行,但我想知道为什么? 麻烦了!
2
model = encoding.models.get_model('fcn_resnest50_ade', pretrained=True)
这边我改用FCN,但程式在执行到这行时就已经先占GPU 大概1G
然后到train的过程时,又占另一颗GPU
这边的问题是,要如何确实关闭不要使用多GPU
因为我用DeppLab_ResNeSt就不会有这种情况
麻烦了 谢谢!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two reported cases using DeepLab_ResNeSt50_ADE and fcn_resnest50_ade, comparing torch.load(str(model)) with the map_location='cuda:0' variant. Observe GPU allocation during model loading and training; done means the loading error and unexpected multi-GPU usage have a documented cause and a verified single-GPU behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100