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

Modify Vector.resize to work with cupy and improve resizing #5216

Merged
merged 2 commits into from
Mar 29, 2020

Conversation

adrianeboyd
Copy link
Contributor

Description

Modify Vectors.resize to work with cupy. Modify behavior when resizing to a different vector dimension so that individual vectors are truncated or extended with zeros instead of having the original values filled into the new shape without regard for the original axes.

Types of change

Bug fix.

Checklist

  • I have submitted the spaCy Contributor Agreement.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

Modify `Vectors.resize` to work with cupy. Modify behavior when resizing
to a different vector dimension so that individual vectors are truncated
or extended with zeros instead of having the original values filled into
the new shape without regard for the original axes.
@adrianeboyd adrianeboyd added bug Bugs and behaviour differing from documentation feat / vectors Feature: Word vectors and similarity labels Mar 27, 2020
@adrianeboyd adrianeboyd added the ⚠️ wip Work in progress label Mar 28, 2020
@honnibal honnibal merged commit 963bd89 into explosion:master Mar 29, 2020
@adrianeboyd
Copy link
Contributor Author

Ack, I added the WIP tag because I didn't want it merged yet. The in-place resizing still does the wrong thing with a different shape[1].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs and behaviour differing from documentation feat / vectors Feature: Word vectors and similarity ⚠️ wip Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants