Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
eb08cfc6
Commit
eb08cfc6
authored
Feb 15, 2017
by
Davis King
Browse files
Added some comments about vector calculus.
parent
51476c4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
dlib/dnn/loss.h
dlib/dnn/loss.h
+5
-0
No files found.
dlib/dnn/loss.h
View file @
eb08cfc6
...
@@ -1012,6 +1012,11 @@ namespace dlib
...
@@ -1012,6 +1012,11 @@ namespace dlib
else
else
d2
=
std
::
sqrt
(
d2
);
d2
=
std
::
sqrt
(
d2
);
// It should be noted that the derivative of length(x-y) with respect
// to the x vector is the unit vector (x-y)/length(x-y). If you stare
// at the code below long enough you will see that it's just an
// application of this formula.
if
(
x_label
==
y_label
)
if
(
x_label
==
y_label
)
{
{
// Things with the same label should have distances < dist_thresh between
// Things with the same label should have distances < dist_thresh between
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment