Skip to content

Commit 57e33fb

Browse files
authored
Update test.py with yaml.SafeLoader (ultralytics#1969)
1 parent a06670d commit 57e33fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test(data,
6868
model.eval()
6969
is_coco = data.endswith('coco.yaml') # is COCO dataset
7070
with open(data) as f:
71-
data = yaml.load(f, Loader=yaml.FullLoader) # model dict
71+
data = yaml.load(f, Loader=yaml.SafeLoader) # model dict
7272
check_dataset(data) # check
7373
nc = 1 if single_cls else int(data['nc']) # number of classes
7474
iouv = torch.linspace(0.5, 0.95, 10).to(device) # iou vector for mAP@0.5:0.95

0 commit comments

Comments
 (0)