Skip to content
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

Warn when output shape not specified for Lambda on Theano #4543

Merged
merged 1 commit into from Dec 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions keras/layers/core.py
Expand Up @@ -566,6 +566,11 @@ def get_output_shape_for(self, input_shape):
else:
return K.int_shape(x)
# otherwise, we default to the input shape
warnings.warn('`output_shape` argument not specified for layer {} '
'and cannot be automatically inferred with the Theano backend. '
'Defaulting to output shape `{}` (same as input shape). '
'If the expected output shape is different, specify it via the `output_shape` argument.'
.format(self.name, input_shape))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the rest of the file, use ' instead of " to format strings.

return input_shape
elif type(self._output_shape) in {tuple, list}:
if type(input_shape) is list:
Expand Down