hustvl / TopFormer

TopFormer: Token Pyramid Transformer for Mobile Semantic Segmentation, CVPR2022
Other
373 stars 42 forks source link

Some training problems on 1 gpu #28

Open sungh66 opened 1 year ago

sungh66 commented 1 year ago

I want to train on 1 gpu without using distributed training, so i ran

python tools/train.py local_configs/topformer/topformer_small_512x512_160k_2x8_ade20k.py 1 --work-dir runs/

and added

import sys
sys.path.append("/home/xx/TopFormer-main")

to train.py Finally i got this:

assert hasattr(ext, fun), f'{fun} miss in module {name}' AssertionError: ball_query_forward miss in module _ext

How can i fix the problem? 我重装了1.3.14版本的mmcv解决了上述问题,但是我在使用自己的ade20k数据的时候出现了一个bug

2022-10-31 18:18:14,190 - mmseg - INFO - Loaded 22945 images
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
  File "tools/train.py", line 183, in <module>
    main()
  File "tools/train.py", line 179, in main
    meta=meta)
  File "/home/xx/TopFormer-main/mmseg/apis/train.py", line 88, in train_segmentor
    drop_last=True) for ds in dataset
  File "/home/xx/TopFormer-main/mmseg/apis/train.py", line 88, in <listcomp>
    drop_last=True) for ds in dataset
TypeError: object of type 'int' has no len()