Skip to content

Commit

Permalink
Update mmcls/models/heads/cls_head.py
Browse files Browse the repository at this point in the history
Co-authored-by: Colle <piercus@users.noreply.github.com>
  • Loading branch information
marouaneamz and piercus committed Dec 6, 2022
1 parent ecdfb87 commit 3dc8324
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mmcls/models/heads/cls_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,9 @@ def _get_predictions(self, cls_score, data_samples):

for data_sample, score, label in zip(data_samples, pred_scores,
pred_labels):
data_sample_ = data_sample
if data_sample is None:
data_sample_ = ClsDataSample()
data_sample = ClsDataSample()

data_sample_.set_pred_score(score).set_pred_label(label)
out_data_samples.append(data_sample_)
data_sample.set_pred_score(score).set_pred_label(label)
out_data_samples.append(data_sample)
return out_data_samples

0 comments on commit 3dc8324

Please sign in to comment.