Commit 236c6865 authored by Gustaf Ahdritz's avatar Gustaf Ahdritz
Browse files

Address template edge case

parent b9eede45
...@@ -100,9 +100,12 @@ def unify_template_features( ...@@ -100,9 +100,12 @@ def unify_template_features(
if(n_templates != 0): if(n_templates != 0):
out_dicts.append(out_dict) out_dicts.append(out_dict)
if(len(out_dicts) > 0):
out_dict = { out_dict = {
k: np.concatenate([od[k] for od in out_dicts]) for k in out_dicts[0] k: np.concatenate([od[k] for od in out_dicts]) for k in out_dicts[0]
} }
else:
out_dict = empty_template_feats(sum(seq_lens))
return out_dict return out_dict
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment