Different module metrics for train/val
rohitgr7 opened this issue · comments
Module metrics stores internal states computed over each call on different batches. So using the same instance for both train and val might not lead to correct results when computed over epoch with (on_epoch=True) in step hooks. I'd suggest creating separate ones for each task (train & val).
ref: https://torchmetrics.readthedocs.io/en/latest/pages/quickstart.html#module-metrics
MLOps-Basics/week_9_monitoring/model.py
Lines 24 to 33 in d4ad5a9
cc @graviraja