Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 12, 2024
1 parent 80a3ace commit a2c985a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/utils/trans_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ 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] = torch.tensor(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 a2c985a

Please sign in to comment.