Revert deletion of training accuracy.

This commit is contained in:
Alexander Engelsberger 2021-05-06 18:02:01 +02:00
parent 1c3613019b
commit 5a2f4f6170

View File

@ -52,6 +52,8 @@ class GLVQ(AbstractPrototypeModel):
# Compute training accuracy # Compute training accuracy
with torch.no_grad(): with torch.no_grad():
preds = wtac(dis, plabels) preds = wtac(dis, plabels)
self.train_acc(preds.int(), y.int())
# `.int()` because FloatTensors are assumed to be class probabilities # `.int()` because FloatTensors are assumed to be class probabilities
# Logging # Logging