mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-27 13:12:20 +08:00
removed dummy d
This commit is contained in:
1 parent
88f064d276
commit
8e131f9d79
1 file changed
+5
-1
+5
-1
@@ -70,7 +70,11 @@ def main():
|
||||
x, y = batch
|
||||
x = x.view(x.size(0), -1)
|
||||
out = model(x)
|
||||
print(out)
|
||||
|
||||
labels_hat = torch.argmax(out, dim=1)
|
||||
val_acc = torch.sum(y == labels_hat).item() / (len(y) * 1.0)
|
||||
val_acc = torch.tensor(val_acc)
|
||||
print(val_acc)
|
||||
|
||||
|
||||
clear_tt_dir()
|
||||
|
||||
Reference in new issue
Block a user