vturrisi / solo-learn

solo-learn: a library of self-supervised methods for visual representation learning powered by Pytorch Lightning
MIT License
1.42k stars 185 forks source link

Finding the Current Epoch #333

Closed kkokilep closed 1 year ago

kkokilep commented 1 year ago

Hello,

I am trying to implement a method that makes use of the current epoch to decide when to change a parameter I introduce. However, I am unsure where in the code to extract the current epoch. It seems that this is hidden.

Thanks for any help!

DonkeyShot21 commented 1 year ago

https://github.com/vturrisi/solo-learn/blob/e38418437698e767c37dabf1f2edae3f04fe6c56/solo/methods/swav.py#L239

vturrisi commented 1 year ago

@kkokilep to clarify, current_epoch is a pytorch lightning module variable. See https://lightning.ai/docs/pytorch/stable/common/lightning_module.html#current-epoch