Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,14 @@ def decode_beam(model, test_dataloader, voc, device, args, logger, smethod, dat
param_str = [str(s) for s in args.sparam]
param_str= '_'.join(param_str)

outdir = str(args.out_dir)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add code to create directory. "os.makedirs(outdir, exist_ok=True)"

if smethod == 'submod':
res_save_path= os.path.join('Output', 'results_{}_{}_{}_{}'.format(smethod, data_sub, args.slam, param_str))
fres_save_path= os.path.join('Output', 'fres_{}_{}_{}_{}'.format(smethod, data_sub, args.slam, param_str))
res_save_path= os.path.join(outdir, 'results_{}_{}_{}_{}'.format(smethod, data_sub, args.slam, param_str))
fres_save_path= os.path.join(outdir, 'fres_{}_{}_{}_{}'.format(smethod, data_sub, args.slam, param_str))
else:
res_save_path= os.path.join('Output', 'results_{}_{}'.format(smethod, data_sub))
fres_save_path= os.path.join('Output', 'fres_{}_{}'.format(smethod, data_sub))
res_save_path= os.path.join(outdir, 'results_{}_{}'.format(smethod, data_sub))
fres_save_path= os.path.join(outdir, 'fres_{}_{}'.format(smethod, data_sub))

np.save(res_save_path, all_results)
np.save(fres_save_path, final_res)
Expand Down