Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The training mode is accidentally enabled in training_step function. #18781

Closed
w2kun opened this issue Oct 11, 2023 · 1 comment
Closed

The training mode is accidentally enabled in training_step function. #18781

w2kun opened this issue Oct 11, 2023 · 1 comment
Labels
bug Something isn't working needs triage Waiting to be triaged by maintainers ver: 1.9.x
Milestone

Comments

@w2kun
Copy link

w2kun commented Oct 11, 2023

Bug description

I defined a neural network in the init method of a lightning module, and some modules of this network are pre-trained. I fixed these pretrained modules and set their training mode to false. However, when training started, I found that the training mode of these modules was unexpectedly set to true. I think this may be a potential bug.

What version are you seeing the problem on?

v1.9

How to reproduce the bug

No response

Error messages and logs

# Error messages and logs here please

Environment

Current environment
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow):
#- PyTorch Lightning Version (e.g., 1.5.0):
#- Lightning App Version (e.g., 0.5.2):
#- PyTorch Version (e.g., 2.0):
#- Python version (e.g., 3.9):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):
#- Running environment of LightningApp (e.g. local, cloud):

More info

No response

@w2kun w2kun added bug Something isn't working needs triage Waiting to be triaged by maintainers labels Oct 11, 2023
@carmocca
Copy link
Contributor

This was most likely fixed by #18951

@carmocca carmocca added this to the 2.2 milestone Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Waiting to be triaged by maintainers ver: 1.9.x
Projects
None yet
Development

No branches or pull requests

2 participants