Implement yaml.safe_load() (#2876)

* Implement yaml.safe_load()

* yaml.safe_dump()
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-04-21 14:34:45 +02:00
1 parent c949fc86d1
commit f7bc685c2c
10 files changed
+23 -22

No files matched your search

+1 -1
View File
@@ -71,7 +71,7 @@ def test(data,
if isinstance(data, str):
is_coco = data.endswith('coco.yaml')
with open(data) as f:
data = yaml.load(f, Loader=yaml.SafeLoader)
data = yaml.safe_load(f)
check_dataset(data) # check
nc = 1 if single_cls else int(data['nc']) # number of classes
iouv = torch.linspace(0.5, 0.95, 10).to(device) # iou vector for mAP@0.5:0.95