Skip to content

Commit efe6894

Browse files
committed
Fix bug where labels werent put on the device
1 parent 79fbfed commit efe6894

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def main():
196196
model.eval()
197197
with th.no_grad():
198198
for x, y in valiloader:
199-
x = x.to(device)
199+
x, y = x.to(device), y.to(device)
200200
pred = model.forward(x)
201201
loss = criterion(y, pred)
202202
evalloss.append(loss.item())

0 commit comments

Comments
 (0)