From 5a2f4f617003ea511c3f39c8ffad74b28115933c Mon Sep 17 00:00:00 2001 From: Alexander Engelsberger Date: Thu, 6 May 2021 18:02:01 +0200 Subject: [PATCH] Revert deletion of training accuracy. --- prototorch/models/glvq.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prototorch/models/glvq.py b/prototorch/models/glvq.py index efd76b7..ff1da61 100644 --- a/prototorch/models/glvq.py +++ b/prototorch/models/glvq.py @@ -52,6 +52,8 @@ class GLVQ(AbstractPrototypeModel): # Compute training accuracy with torch.no_grad(): preds = wtac(dis, plabels) + + self.train_acc(preds.int(), y.int()) # `.int()` because FloatTensors are assumed to be class probabilities # Logging