ppogg / YOLOv5-Lite

🍅🍅🍅YOLOv5-Lite: Evolved from yolov5 and the size of model is only 900+kb (int8) and 1.7M (fp16). Reach 15 FPS on the Raspberry Pi 4B~
GNU General Public License v3.0
2.29k stars 407 forks source link

SyntaxError: invalid syntax #218

Open springfrie opened 1 year ago

springfrie commented 1 year ago

Traceback (most recent call last): File "train.py", line 24, in import test # import test.py to get mAP after each epoch File "G:\Python\YOLO5_DEEPSOFT\Python-reps\YOLOv5-Lite-master\test.py", line 12, in from models.experimental import attempt_load File "G:\Python\YOLO5_DEEPSOFT\Python-reps\YOLOv5-Lite-master\models\experimental.py", line 7, in from models.common import Conv File "G:\Python\YOLO5_DEEPSOFT\Python-reps\YOLOv5-Lite-master\models\common.py", line 17, in from utils.datasets import letterbox File "G:\Python\YOLO5_DEEPSOFT\Python-reps\YOLOv5-Lite-master\utils\datasets.py", line 23, in from utils.general import check_requirements, xyxy2xywh, xywh2xyxy, xywhn2xyxy, xyn2xy, segment2box, segments2boxes, \ File "G:\Python\YOLO5_DEEPSOFT\Python-reps\YOLOv5-Lite-master\utils\general.py", line 23, in from utils.torch_utils import init_torch_seeds File "G:\Python\YOLO5_DEEPSOFT\Python-reps\YOLOv5-Lite-master\utils\torch_utils.py", line 71 import torch assert torch.cuda.is_available(), f'CUDA unavailable, invalid device {device} requested' # check availability ^ SyntaxError: invalid syntax 这是什么问题?

ppogg commented 1 year ago

这个只是环境的问题,和代码无关~