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

Fix shape of loaded preprocessed features (Fixes #1738 and #1772) #1872

Merged
merged 2 commits into from
Feb 13, 2019

Conversation

reuben
Copy link
Contributor

@reuben reuben commented Feb 12, 2019

No description provided.

@reuben reuben self-assigned this Feb 12, 2019
for i in range(len(features)):
features[i] = np.reshape(features[i], [features_len[i], -1])
features[i].shape = [features_len[i]+2*numcontext, numcep]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Setting .shape instead of using np.reshape guarantees it won't copy the data, it'll instead fail if the reshape can't be done without copying.

@@ -2,7 +2,7 @@ pandas
progressbar2
python-utils
tensorflow == 1.12.0
numpy
numpy == 1.15.4
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's because of 1.16.1 erroring, this should be fixed now: piwheels/piwheels#127

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

@lissyx lissyx left a comment

Choose a reason for hiding this comment

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

LGTM but I'm not sure about the numpy stuff.

@reuben reuben merged commit f5aa47b into master Feb 13, 2019
@reuben reuben deleted the issue1738 branch February 13, 2019 13:03
@reuben
Copy link
Contributor Author

reuben commented Feb 13, 2019

Merged as discussed on IRC.

@lock
Copy link

lock bot commented Mar 15, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants