Skip to content

Commit

Permalink
🔨 better Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik4949 committed Dec 1, 2020
1 parent d2f0a02 commit dfece30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytorch_lightning/core/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def _get_out_size_params(out_sizes):
try:
# try to find prod, i.e check for unknown sizes.
_total_out_params += np.prod(out_sizes)
except:
# do nothing if could not find product.
except TypeError:
# do nothing if tried to find prod on unknown type.
pass
else:
_ = [_get_out_size_params(out_size) for out_size in out_sizes if isinstance(out_size, list)]
Expand Down

0 comments on commit dfece30

Please sign in to comment.