Traceback (most recent call last):
File "C:\Users\Gary\Desktop\yolov5-5.0\yolov5-5.0\train.py", line 543, in <module>
train(hyp, opt, device, tb_writer)
File "C:\Users\Gary\Desktop\yolov5-5.0\yolov5-5.0\train.py", line 88, in train
model = Model(opt.cfg or ckpt['model'].yaml, ch=3, nc=nc, anchors=hyp.get('anchors')).to(device) # create
File "C:\Users\Gary\Desktop\yolov5-5.0\yolov5-5.0\models\yolo.py", line 73, in __init__
self.yaml_file = Path(cfg).name
NameError: name 'Path' is not defined
please, how to solve those problems?
from pathlib import Path
?