Selaa lähdekoodia

Reduce memory usage during evaluation

Yichao Zhou 6 vuotta sitten
vanhempi
commit
2c9d414413
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      lcnn/models/line_vectorizer.py

+ 1 - 1
lcnn/models/line_vectorizer.py

@@ -159,7 +159,7 @@ class LineVectorizer(nn.Module):
             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