From 9d6e2436695a70ab1e0938ec62e5b2cce377722e Mon Sep 17 00:00:00 2001 From: Paul Best <paul.best@lis-lab.fr> Date: Mon, 3 Oct 2022 15:45:58 +0200 Subject: [PATCH] small fix in save file type --- run_CNN.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_CNN.py b/run_CNN.py index e87bb76..e15d1df 100644 --- a/run_CNN.py +++ b/run_CNN.py @@ -89,7 +89,7 @@ with torch.no_grad(): out.filename, out.offset, out.prediction = fns, offsets, preds pred_fn = list(filter(lambda e: e!='', args.audio_folder.split('/')))[-1] + ('.csv' if args.maxPool else '.pkl') if args.output_filename == '' else args.output_filename print(f'Saving results into {pred_fn}') -if args.maxPool: +if pred_fn.endswith('csv'): out.to_csv(pred_fn, index=False) else: out.to_pickle(pred_fn) -- GitLab