File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -327,8 +327,8 @@ def infer(self):
327327
328328 if (self .config ['testing' ].get ('evaluation_mode' , True )):
329329 self .net .eval ()
330-
331- output_csv = self .config ['testing' ]['output_csv' ]
330+
331+ output_csv = self .config ['testing' ]['output_dir' ] + '/' + self . config [ 'testing' ][ ' output_csv' ]
332332 class_num = self .config ['network' ]['class_num' ]
333333 save_probability = self .config ['testing' ].get ('save_probability' , False )
334334
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ def main():
1717 print (' pymic_test config.cfg' )
1818 exit ()
1919 cfg_file = str (sys .argv [1 ])
20+ if (not os .path .isfile (cfg_file )):
21+ raise ValueError ("The config file does not exist: " + cfg_file )
2022 config = parse_config (cfg_file )
2123 config = synchronize_config (config )
2224 log_dir = config ['testing' ]['output_dir' ]
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ def main():
6868 print (' pymic_train config.cfg' )
6969 exit ()
7070 cfg_file = str (sys .argv [1 ])
71+ if (not os .path .isfile (cfg_file )):
72+ raise ValueError ("The config file does not exist: " + cfg_file )
7173 config = parse_config (cfg_file )
7274 config = synchronize_config (config )
7375 log_dir = config ['training' ]['ckpt_save_dir' ]
You can’t perform that action at this time.
0 commit comments