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
824eb455
Commit
824eb455
authored
Dec 19, 2012
by
Davis King
Browse files
Fixed a bug introduced in the last commit.
parent
b4279045
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
dlib/svm/svm_rank_trainer.h
dlib/svm/svm_rank_trainer.h
+6
-0
No files found.
dlib/svm/svm_rank_trainer.h
View file @
824eb455
...
@@ -165,7 +165,10 @@ namespace dlib
...
@@ -165,7 +165,10 @@ namespace dlib
subgradient
=
scale
*
subgradient
;
subgradient
=
scale
*
subgradient
;
if
(
last_weight_1
)
if
(
last_weight_1
)
{
w
(
w
.
size
()
-
1
)
=
0
;
subgradient
(
w
.
size
()
-
1
)
=
0
;
subgradient
(
w
.
size
()
-
1
)
=
0
;
}
}
}
private:
private:
...
@@ -386,6 +389,9 @@ namespace dlib
...
@@ -386,6 +389,9 @@ namespace dlib
w
,
w
,
num_nonnegative
);
num_nonnegative
);
if
(
last_weight_1
)
w
(
w
.
size
()
-
1
)
=
1
;
// put the solution into a decision function and then return it
// put the solution into a decision function and then return it
decision_function
<
kernel_type
>
df
;
decision_function
<
kernel_type
>
df
;
df
.
b
=
0
;
df
.
b
=
0
;
...
...
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