0x90e commited on
Commit
d2b0313
·
1 Parent(s): 612f527

Try to improve speed?

Browse files
Files changed (1) hide show
  1. test.py +5 -0
test.py CHANGED
@@ -5,6 +5,11 @@ import cv2
5
  import numpy as np
6
  import torch
7
  import architecture as arch
 
 
 
 
 
8
 
9
  model_path = '4x_eula_digimanga_bw_v2_nc1_307k.pth'
10
  img_path = sys.argv[1]
 
5
  import numpy as np
6
  import torch
7
  import architecture as arch
8
+ import multiprocessing
9
+
10
+ cpu_count = multiprocessing.cpu_count()
11
+
12
+ torch.set_num_threads(cpu_count)
13
 
14
  model_path = '4x_eula_digimanga_bw_v2_nc1_307k.pth'
15
  img_path = sys.argv[1]