zhanghang1989 / zhanghang1989/PyTorch-Encoding
ImportError: cannot import name 'SyncBatchNorm'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2k
- Forks
- 448
- PR merge metrics
- No merged PRs in 30d
Description
when I train the model using
CUDA_VISIBLE_DEVICES=0,1 python train.py --dataset pascal_voc --model encnet --aux --se-loss at the experiments/segmentation branch, I encouter this problem
File "experiments/segmentation/train.py", line 18, in
from encoding.nn import SegmentationLosses, SyncBatchNorm, OHEMSegmentationLosses
ImportError: cannot import name 'SyncBatchNorm'
can u tell me how to fix it?
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 failure with the provided CUDA_VISIBLE_DEVICES command from experiments/segmentation, starting at experiments/segmentation/train.py line 18. Inspect how encoding.nn exposes SyncBatchNorm and verify that the training command no longer raises the ImportError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100