fix cosine_similarity (#18168)
authorAiling Zhang <ailzhang@fb.com>
Wed, 20 Mar 2019 03:02:29 +0000 (20:02 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 20 Mar 2019 03:09:17 +0000 (20:09 -0700)
commit8895bfba6aac8ca99c6d4483fa9b8b32c8a95c83
tree1a2a2f2f4fc8c4c2a1e67ae7faaea21a92ce3802
parent3baf99bea7d66e03cacf6280de8e18cca9bfbdda
fix cosine_similarity (#18168)

Summary:
fixes #18057 according to colesbury 's suggestion. Thanks!
cc: ezyang
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18168

Differential Revision: D14520953

Pulled By: ailzhang

fbshipit-source-id: 970e6cfb482d857a81721ec1d0ee4a4df84a0450
aten/src/ATen/native/Distance.cpp
test/test_nn.py