summaryrefslogtreecommitdiff
path: root/text_recognizer/models/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'text_recognizer/models/base.py')
-rw-r--r--text_recognizer/models/base.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/text_recognizer/models/base.py b/text_recognizer/models/base.py
index 3b83056..3e02261 100644
--- a/text_recognizer/models/base.py
+++ b/text_recognizer/models/base.py
@@ -31,9 +31,15 @@ class BaseLitModel(LightningModule):
loss_fn: Type[nn.Module] = attr.ib(init=False)
- train_acc: torchmetrics.Accuracy = attr.ib(init=False, default=torchmetrics.Accuracy())
- val_acc: torchmetrics.Accuracy = attr.ib(init=False, default=torchmetrics.Accuracy())
- test_acc: torchmetrics.Accuracy = attr.ib(init=False, default=torchmetrics.Accuracy())
+ train_acc: torchmetrics.Accuracy = attr.ib(
+ init=False, default=torchmetrics.Accuracy()
+ )
+ val_acc: torchmetrics.Accuracy = attr.ib(
+ init=False, default=torchmetrics.Accuracy()
+ )
+ test_acc: torchmetrics.Accuracy = attr.ib(
+ init=False, default=torchmetrics.Accuracy()
+ )
@loss_fn.default
def configure_criterion(self) -> Type[nn.Module]: