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

Allow (n, 0) croppings on Cropping2d and 3d #4941

Merged
merged 2 commits into from Jan 12, 2017

Conversation

patyork
Copy link
Contributor

@patyork patyork commented Jan 6, 2017

  • A cropping of (n, 0) is now valid on any axis
    • Previously, these would cause a slice of [n : -0] which is valid, but returns 0 items
  • Added tests for the case of (0, 0) crops

I did it in this ugly way to allow for non-defined shapes (even though this is an odd case for images) and to minimize memory usage.

@fchollet
Copy link
Member

LGTM, thanks.

@fchollet fchollet merged commit e5529d9 into keras-team:master Jan 12, 2017
@patyork patyork deleted the FixCropping branch January 22, 2017 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants