Skip to content

Commit 8bb858a

Browse files
committed
fix pattern
1 parent f432368 commit 8bb858a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clean_kept_models.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
if not prefixes:
1010
prefixes = ['.']
1111

12-
for prefix in prefixes:
13-
for suffix in ['caffemodel','solverstate']:
12+
for dirname in prefixes:
13+
for suffix in ['caffemodel','solverstate','checkpoint','gen_model_state','gen_solver_state']:
1414
files = collections.defaultdict(list)
15-
for fname in glob.glob('%s/*.%s'%(prefix,suffix)):
15+
for fname in glob.glob('%s/*.%s'%(dirname,suffix)):
1616
m = re.search('(.*)_iter_(\d+)\.%s'%suffix,fname)
1717
if m:
1818
prefix = m.group(1)

0 commit comments

Comments
 (0)