Skip to content

Commit

Permalink
Bug fix in get_pred_dict
Browse files Browse the repository at this point in the history
  • Loading branch information
Ming Du committed May 31, 2024
1 parent 50658f3 commit ae64f07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generic_trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,8 @@ def get_pred_dict(self, preds):
:return: dict.
"""
d = {}
for i, name in enumerate(self.configs.pred_names_and_types):
d[name] = preds[i][0]
for i, name_and_type in enumerate(self.configs.pred_names_and_types):
d[name_and_type[0]] = preds[i]
return d

def process_data_loader_yield_sample_first(self, data_and_labels, data_label_separation_index):
Expand Down

0 comments on commit ae64f07

Please sign in to comment.