Skip to content

Commit

Permalink
Reduce memory usage during evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou13 committed Oct 17, 2019
1 parent 7fdb112 commit 2c9d414
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lcnn/models/line_vectorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def sample_lines(self, meta, jmap, joff, do_evaluation):
max_K = M.n_dyn_junc // n_type
N = len(junc)
if do_evaluation:
K = min(int((jmap > M.eval_junc_thres).float().sum().item()), 2 * max_K)
K = min(int((jmap > M.eval_junc_thres).float().sum().item()), max_K)
else:
K = min(int(N * 2 + 2), max_K)
device = jmap.device
Expand Down

0 comments on commit 2c9d414

Please sign in to comment.