Implement yaml.safe_load() (#2876)
* Implement yaml.safe_load() * yaml.safe_dump()
This commit is contained in:
1 parent
c949fc86d1
commit
f7bc685c2c
10 files changed
+23
-22
No files matched your search
+1
-1
@@ -102,7 +102,7 @@ def kmean_anchors(path='./data/coco128.yaml', n=9, img_size=640, thr=4.0, gen=10
|
||||
|
||||
if isinstance(path, str): # *.yaml file
|
||||
with open(path) as f:
|
||||
data_dict = yaml.load(f, Loader=yaml.SafeLoader) # model dict
|
||||
data_dict = yaml.safe_load(f) # model dict
|
||||
from utils.datasets import LoadImagesAndLabels
|
||||
dataset = LoadImagesAndLabels(data_dict['train'], augment=True, rect=True)
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user