From 4b15644b463e718f8db2d6939789ac1ae143c0fa Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 14 May 2019 12:59:12 +0200 Subject: [PATCH] updates --- utils/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/utils.py b/utils/utils.py index 6eba4e5f..4f787fc5 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -31,9 +31,9 @@ def init_seeds(seed=0): def load_classes(path): - # Loads class labels at 'path' - fp = open(path, 'r') - names = fp.read().split('\n') + # Loads *.names file at 'path' + with open(path, 'r') as f: + names = f.read().split('\n') return list(filter(None, names)) # filter removes empty strings (such as last line)