Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikprasad committed Apr 5, 2021
1 parent e15e49c commit 8fcfe8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Fixed

- Sanitze `None` params during pruning ([#6836])(https://github.com/PyTorchLightning/pytorch-lightning/pull/6836)


- Made the `Plugin.reduce` method more consistent across all Plugins to reflect a mean-reduction by default ([#6011](https://github.com/PyTorchLightning/pytorch-lightning/pull/6011))


Expand Down
3 changes: 1 addition & 2 deletions pytorch_lightning/callbacks/pruning.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,7 @@ def sanitize_parameters_to_prune(

if parameters_to_prune is None:
parameters_to_prune = [
(m, p) for p in parameters for m in current_modules
if hasattr(m, p) and getattr(m, p) is not None
(m, p) for p in parameters for m in current_modules if getattr(m, p, None) is not None
]
elif (
isinstance(parameters_to_prune, (list, tuple)) and len(parameters_to_prune) > 0
Expand Down

0 comments on commit 8fcfe8a

Please sign in to comment.