updates
This commit is contained in:
parent
e42278e981
commit
4b15644b46
|
@ -31,9 +31,9 @@ def init_seeds(seed=0):
|
||||||
|
|
||||||
|
|
||||||
def load_classes(path):
|
def load_classes(path):
|
||||||
# Loads class labels at 'path'
|
# Loads *.names file at 'path'
|
||||||
fp = open(path, 'r')
|
with open(path, 'r') as f:
|
||||||
names = fp.read().split('\n')
|
names = f.read().split('\n')
|
||||||
return list(filter(None, names)) # filter removes empty strings (such as last line)
|
return list(filter(None, names)) # filter removes empty strings (such as last line)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue