hustvl / YOLOS

[NeurIPS 2021] You Only Look at One Sequence
https://arxiv.org/abs/2106.00666
MIT License
827 stars 118 forks source link

Case of one GPU #15

Closed ver0z closed 2 years ago

ver0z commented 2 years ago

When running with just one GPU for the following line codes: !python -m torch.distributed.launch \ --nproc_per_node=1 --use_env main.py \ --coco_path /content/coco/ \ --batch_size 1 \ --lr 2.5e-5 \ --epochs 150 \ --backbone_name small \ --pre_trained /content/deit_s_width_200.pth \ --eval_size 800 \ --init_pe_size 512 864 \ --mid_pe_size 512 864 \ --output_dir /content/Output/

So the output says that it can not import _new_empty_tensor for surpassing this error I changed the verification of torchvision version on misc.py

Traceback (most recent call last): File "main.py", line 13, in import datasets File "/content/YOLOS/datasets/init.py", line 5, in from .coco import build as build_coco File "/content/YOLOS/datasets/coco.py", line 14, in import datasets.transforms as T File "/content/YOLOS/datasets/transforms.py", line 13, in from util.misc import interpolate File "/content/YOLOS/util/misc.py", line 22, in from torchvision.ops import _new_empty_tensor ImportError: cannot import name '_new_empty_tensor' from 'torchvision.ops'