Abhiram V commited on
Commit
91c30e4
·
unverified ·
1 Parent(s): 35400dc

Update test.py with yaml.SafeLoader (#1969)

Browse files
Files changed (1) hide show
  1. test.py +1 -1
test.py CHANGED
@@ -68,7 +68,7 @@ def test(data,
68
  model.eval()
69
  is_coco = data.endswith('coco.yaml') # is COCO dataset
70
  with open(data) as f:
71
- data = yaml.load(f, Loader=yaml.FullLoader) # model dict
72
  check_dataset(data) # check
73
  nc = 1 if single_cls else int(data['nc']) # number of classes
74
  iouv = torch.linspace(0.5, 0.95, 10).to(device) # iou vector for [email protected]:0.95
 
68
  model.eval()
69
  is_coco = data.endswith('coco.yaml') # is COCO dataset
70
  with open(data) as f:
71
+ data = yaml.load(f, Loader=yaml.SafeLoader) # model dict
72
  check_dataset(data) # check
73
  nc = 1 if single_cls else int(data['nc']) # number of classes
74
  iouv = torch.linspace(0.5, 0.95, 10).to(device) # iou vector for [email protected]:0.95