File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,16 @@ parser.add_argument('-out_path',
1515 help = 'Output directory' ,
1616 default = '.' ,
1717 metavar = 'DIR' )
18+ parser .add_argument ('-n_cpu' ,
19+ help = 'Number of CPUs to use in the prediction' ,
20+ default = - 1 ,
21+ type = int ,
22+ metavar = 'NCPU' )
1823parser .add_argument ('--gpu' ,
19- help = 'Use GPU' ,
24+ help = 'Use GPU. This option overrides -n_cpu option ' ,
2025 action = 'store_true' )
2126parser .add_argument ('--plot' ,
22- help = 'Plot predictions. Images will be stored in the path defined by -out_path' ,
27+ help = 'Plot predictions. Images will be stored in the path defined by the -out_path' ,
2328 action = 'store_true' )
2429args = parser .parse_args ()
2530
@@ -44,7 +49,7 @@ if not len(data) == len(raw_data):
4449 exit ()
4550
4651print ("Loading DeepCoil model..." )
47- dc = DeepCoil (use_gpu = args .gpu )
52+ dc = DeepCoil (use_gpu = args .gpu , n_cpu = args . n_cpu )
4853
4954print ('Predicting...' )
5055preds = dc .predict (data )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def test_seq_regression(self):
1212 f = h5py .File ('tests/data/test_seq_ref.hdf5' , 'r' )
1313
1414 # Predict with DeepCoil
15- dc = DeepCoil (use_gpu = False )
15+ dc = DeepCoil (use_gpu = False , n_cpu = 4 )
1616 results = dc .predict (seq_dict )
1717
1818 # Compare predictions with cached predictions
You can’t perform that action at this time.
0 commit comments