how to set find_unused_parameters=True? #5799
-
🐛 Bug
when I use pt 1.0.8, my model is ok, but when I switch to 1.1.4, it throws this error. It seems 1.0.8 enable unused parameters by default, but 1.1.4 not. How to solve this problem. I think switch |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
i ran into the same issue. any ideas? |
Beta Was this translation helpful? Give feedback.
-
this is my workaround. but hasn't tested whether it will influence my model precision. |
Beta Was this translation helpful? Give feedback.
-
xiadingZ, does your solution go into PyTorch lightning or as an application? |
Beta Was this translation helpful? Give feedback.
-
No need to subclass trainer = pl.Trainer(plugins=[DDPPlugin(find_unused_parameters=True)]) Which is used here: Sorry for the inconvenience! |
Beta Was this translation helpful? Give feedback.
No need to subclass
DDPPlugin
. This is enough:Which is used here:
https://github.com/PyTorchLightning/pytorch-lightning/blob/0a50bb406fa41dfa6a0e2be52f531a9c81c87d00/pytorch_lightning/plugins/ddp_plugin.py#L66-L68
Sorry for the inconvenience!