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
这是什么问题?
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
这是什么问题?