Skip to content

Fix cosine_similarity's output shape#3811

Merged
soumith merged 1 commit intopytorch:masterfrom
zou3519:cos
Nov 21, 2017
Merged

Fix cosine_similarity's output shape#3811
soumith merged 1 commit intopytorch:masterfrom
zou3519:cos

Conversation

@zou3519
Copy link
Copy Markdown
Contributor

@zou3519 zou3519 commented Nov 21, 2017

Fixes #3797. 1's in the input size would get squeezed (ie, cosine similarity between two inputs of size (1, 3, 2, 1) would result in an output shape of (2,) instead of (1, 2, 1). This makes it so that those dimensions are not squeezed.

Test Plan

python test/test_nn.py TestNN.test_cosine_similarity

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.

2 participants