fix: add train accur log
Browse files- detector/model.py +4 -0
detector/model.py
CHANGED
|
@@ -125,6 +125,10 @@ class FontDetector(ptl.LightningModule):
|
|
| 125 |
)
|
| 126 |
|
| 127 |
def on_train_epoch_end(self) -> None:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
self.font_accur_train.reset()
|
| 129 |
self.direction_accur_train.reset()
|
| 130 |
|
|
|
|
| 125 |
)
|
| 126 |
|
| 127 |
def on_train_epoch_end(self) -> None:
|
| 128 |
+
self.log("train_font_accur", self.font_accur_train.compute(), sync_dist=True)
|
| 129 |
+
self.log(
|
| 130 |
+
"train_direction_accur", self.direction_accur_train.compute(), sync_dist=True
|
| 131 |
+
)
|
| 132 |
self.font_accur_train.reset()
|
| 133 |
self.direction_accur_train.reset()
|
| 134 |
|