Unexpected behavior: `model.train()` is not called without validation loop
🐛 Bug
The lightning module's .train() method is never called unless validation is implemented. This causes issue with e.g. the new transfer learning example where the .train is overridden and used to freeze layers. It only works with a validation loop. (Note that the example linked above did an equivalent of .train() in on_epoch_start)
I don't think this behavior is documented.
To Reproduce
Run this google colab:
https://colab.research.google.com/drive/10aoFWAaOE-Epm88Io9bHxgsIfHGhr8cS
And it would show that CoolSystemNoVal does not call .train(), only CoolSystemWithVal does.
Expected behavior
.train() called no matter for CoolSystemNoVal or CoolSystemWithVal
Environment
It's google colab.