forked from ultralytics/yolov5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update test.py with yaml.SafeLoader (ultralytics#1969)
- Loading branch information
1 parent
35400dc
commit 91c30e4
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ def test(data, | |
model.eval() | ||
is_coco = data.endswith('coco.yaml') # is COCO dataset | ||
with open(data) as f: | ||
data = yaml.load(f, Loader=yaml.FullLoader) # model dict | ||
data = yaml.load(f, Loader=yaml.SafeLoader) # model dict | ||
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 [email protected]:0.95 | ||
|