Thanks to visit codestin.com
Credit goes to github.com

Skip to content

implement CosineEmbeddingLoss as a native function and add reduce arg#5646

Merged
ezyang merged 5 commits into
pytorch:masterfrom
li-roy:cosine2
Mar 8, 2018
Merged

implement CosineEmbeddingLoss as a native function and add reduce arg#5646
ezyang merged 5 commits into
pytorch:masterfrom
li-roy:cosine2

Conversation

@li-roy
Copy link
Copy Markdown
Contributor

@li-roy li-roy commented Mar 8, 2018

as per #264. reattempting to merge #5447

forward (new) [1.1905965859768912, 1.160144692985341, 1.1558120870031416]
backward (new) [1.9150976981036365, 1.9792822760064155, 1.8779143309220672]
double backward (new) [3.6898688060464337, 3.5784677929477766, 3.569505032035522]

forward (old) [3.2359962839400396, 3.275224728975445, 3.3409753759624436]
backward (old) [5.668679727939889, 5.722980880062096, 5.585088661056943]
double backward (old) N/A

Copy link
Copy Markdown
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

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

LGTM as long as the CI passes!

@ezyang ezyang merged commit 4c4a42b into pytorch:master Mar 8, 2018
@li-roy li-roy deleted the cosine2 branch March 20, 2018 14:13
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…pytorch#5646)

* implement CosineEmbeddingLoss as a native function and add reduce=True arg to it

* fix flake8

* address comments

* add reference function to tests

* fix flake8
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.

3 participants