question: how to set find_unused_parameters=True?
context: 🐛 Bug
  RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your 
  module has parameters that were not used in producing loss. You can enable unused parameter detection by (1) passing the 
  keyword argument `find_unused_parameters=True` to `torch.nn.parallel.DistributedDataParallel`; (2) making sure all `forward` 
  function outputs participate in calculating loss. If you already have done the above two steps, then the distributed data parallel 
  module wasn't able to locate the output tensors in the return value of your module's `forward` function. Please include the loss 
  function and the structure of the return value of `forward` of your module when reporting this issue (e.g. list, dict, iterable).
  
  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 find_unused_parameters=True by default to False is a breaking change, but in docs, it doesn't mention, yet no clear instructions to set to True .
answer: No need to subclass DDPPlugin. This is enough:
  trainer = pl.Trainer(plugins=[DDPPlugin(find_unused_parameters=True)])
  Which is used here:
  
    
      
        pytorch-lightning/pytorch_lightning/plugins/ddp_plugin.py
      
      
          Lines 66 to 68
        in
        0a50bb4
      
    
    
      
  
          
            
             self._ddp_kwargs["find_unused_parameters"] = self._ddp_kwargs.get( 
          
  
          
            
                 "find_unused_parameters", False 
          
  
          
            
             ) 
          
      
    
  
  
  Sorry for the inconvenience!