nv-tlabs / GSCNN

Gated-Shape CNN for Semantic Segmentation (ICCV 2019)
https://nv-tlabs.github.io/GSCNN/
Other
916 stars 200 forks source link

ModuleNotFoundError: No module named 'encoding' #86

Open xjtu19 opened 2 years ago

xjtu19 commented 2 years ago

When I run 'python train.py --evaluate --snapshot checkpoints/best_cityscapes_checkpoint.pth', the bug occurs as:

Traceback (most recent call last): File "train.py", line 381, in main() File "train.py", line 128, in main assert_and_infer_cfg(args) File "E:\Program Files\Anaconda3\envs\newName\E20220227\GSCNN\config.py", line 86, in assert_and_infer_cfg import encoding ModuleNotFoundError: No module named 'encoding'

Then I try to install 'encoding' or search the module 'encoding' in google, but I found nothing. Why does this bug occur? And, how can I settle this problem?

John-cjj commented 1 year ago

May help you

import encoding

     __C.MODEL.BN = 'syncnorm'
    __C.MODEL.BNFUNC = torch.nn.BatchNorm2d
    # __C.MODEL.BNFUNC = encoding.nn.BatchNorm2d

I know this in a website: https://zhuanlan.zhihu.com/p/428556534

eeex-diouf commented 8 months ago

Mabe you can try install "torch-encoding". I use that saving.