Hey, I have a discrepancy when logging two curves on my logger both inside validation_step
and validation_epoch_end
as can be seen on the pictures below (green: validation_step
, black validation_epoch_end
). One curve is very noisy while the other one is smoothed out.
The code is validation_step
is: self.log("Validation/accuracy", self.val_accuracy(preds, batch[1]))
The one in validation_epoch_end
is self.logger.experiment["val/accuracy"].log(round(self.val_accuracy.compute(), 3))
.
Two things I dont understand:
- Why is the x-scale the same?
validation_step
is executed at each validation iteration whilevalidation_epoch_end
only at the end of the validation step. - Why is the curve belonging to
validation_step
so noisy? Is it only logging the accuracy of the last validation iteration (or something similar)?