Skip to content

Fix l2 normalization when handling zero vector#9594

Closed
bairdzhang wants to merge 1 commit intopytorch:masterfrom
bairdzhang:export-D8849732
Closed

Fix l2 normalization when handling zero vector#9594
bairdzhang wants to merge 1 commit intopytorch:masterfrom
bairdzhang:export-D8849732

Conversation

@bairdzhang
Copy link
Contributor

Summary: When the input vector is a zero vector, the previous GPU code will give Nan in backward. We fix this.

Differential Revision: D8849732

fbshipit-source-id: f60c581d94b0d3e90ee706a253e82048c7c9b81f

Summary: When the input vector is a zero vector, the previous GPU code will give Nan in backward. We fix this.

Differential Revision: D8849732

fbshipit-source-id: f60c581d94b0d3e90ee706a253e82048c7c9b81f
jramseyer pushed a commit to jramseyer/pytorch that referenced this pull request Jul 30, 2018
Summary:
Pull Request resolved: pytorch#9594

When the input vector is a zero vector, the previous GPU code will give Nan in backward. We fix this.

Reviewed By: pjh5

Differential Revision: D8849732

fbshipit-source-id: 87b1fb1ee05dfdb0d43bcbe67e36f15896fe1706
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary:
Pull Request resolved: pytorch#9594

When the input vector is a zero vector, the previous GPU code will give Nan in backward. We fix this.

Reviewed By: pjh5

Differential Revision: D8849732

fbshipit-source-id: 87b1fb1ee05dfdb0d43bcbe67e36f15896fe1706
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants