Skip to content

Commit

Permalink
fix data type
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxueg-nv committed Jul 12, 2024
1 parent 6448762 commit 80a3ace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/utils/trans_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def __call__(
pred += 0.5 # inplace mapping to avoid cloning pred
for i in range(1, object_num + 1):
frac = i + 0.5
pred[pred == frac] = data["label_prompt"][i - 1].to(pred.dtype)
pred[pred == frac] = torch.tensor(data["label_prompt"][i - 1]).to(pred.dtype)
pred[pred == 0.5] = 0.0
data[keys] = pred
return data
Expand Down

0 comments on commit 80a3ace

Please sign in to comment.