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
d6c10818
Commit
d6c10818
authored
Apr 23, 2014
by
Davis King
Browse files
Slightly simplified the code
parent
50a2113f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
dlib/svm/structural_svm_problem.h
dlib/svm/structural_svm_problem.h
+1
-3
No files found.
dlib/svm/structural_svm_problem.h
View file @
d6c10818
...
...
@@ -566,14 +566,12 @@ namespace dlib
f
=
matrix_cast
<
double
>
(
reshape
(
rowm
(
m
,
range
(
idx
,
idx
+
size
-
1
)),
nr
,
nc
));
svd3
(
f
,
u
,
w
,
v
);
w
=
round_zeros
(
w
,
std
::
max
(
1e-9
,
max
(
w
)
*
1e-7
));
const
double
norm
=
sum
(
w
);
obj
+=
strength
*
norm
;
nuclear_norm_part
+=
strength
*
norm
/
C
;
w
=
w
>
0
;
f
=
u
*
diagm
(
w
)
*
trans
(
v
);
f
=
u
*
trans
(
v
);
set_rowm
(
grad
,
range
(
idx
,
idx
+
size
-
1
))
=
matrix_cast
<
double
>
(
strength
*
reshape_to_column_vector
(
f
));
}
...
...
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