Commit 5aa1472
Fix data type (#26)
Fixes # da ta type error
### Description
File "/localhome/local-mingxueg/VISTA/scripts/utils/trans_utils.py",
line 352, in __call__
pred[pred == frac] = data["label_prompt"][i - 1].to(pred.dtype)
AttributeError: 'int' object has no attribute 'to'
### Types of changes
pred[pred == frac] = torch.tensor(data["label_prompt"][i -
1]).to(pred.dtype)
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 6448762 commit 5aa1472
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
353 | 355 | | |
354 | 356 | | |
355 | 357 | | |
| |||
0 commit comments