Revert deletion of training accuracy.
This commit is contained in:
parent
1c3613019b
commit
5a2f4f6170
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user