KEMBAR78
Fix cosine_similarity's output shape by zou3519 · Pull Request #3811 · pytorch/pytorch · GitHub
Skip to content

Conversation

@zou3519
Copy link
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