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
Fix all conv layers when filters is 0 #48566
Conversation
@fchollet can you review this ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR.
@@ -298,6 +303,11 @@ def test_conv2d_zero_kernel_size(self): | |||
with self.assertRaises(ValueError): | |||
keras.layers.Conv2D(**kwargs) | |||
|
|||
def test_conv2d_zero_filters(self): | |||
kwargs = {'filters': 0, 'kernel_size': 2} | |||
with self.assertRaisesRegex(ValueError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has two params self.assertRaisesRegex(ValueError, <str>):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bhack sorry about that. I fixed it.
I guess I run into some pylint errors . Solved them. Please review @bhack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
Fix #48470. This PR raises a
ValueError
for all conv layers upon encounteringfilters = 0
. @fchollet