Skip to content

Commit 047a5ec

Browse files
committed
Fix bugs that Mixup does not work device=cpu
1 parent cd34913 commit 047a5ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

timm/data/mixup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def __call__(self, x, target):
214214
lam = self._mix_pair(x)
215215
else:
216216
lam = self._mix_batch(x)
217-
target = mixup_target(target, self.num_classes, lam, self.label_smoothing)
217+
target = mixup_target(target, self.num_classes, lam, self.label_smoothing, x.device)
218218
return x, target
219219

220220

0 commit comments

Comments
 (0)