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
95d1383d
Commit
95d1383d
authored
Dec 10, 2012
by
Davis King
Browse files
A minor change that makes the svm_multiclass_linear_trainer a little bit
faster.
parent
0da136b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
dlib/svm/svm_multiclass_linear_trainer.h
dlib/svm/svm_multiclass_linear_trainer.h
+1
-1
No files found.
dlib/svm/svm_multiclass_linear_trainer.h
View file @
95d1383d
...
@@ -96,7 +96,7 @@ namespace dlib
...
@@ -96,7 +96,7 @@ namespace dlib
{
{
// Compute the F(x,y) part:
// Compute the F(x,y) part:
// perform: temp == dot(relevant part of current solution, samples[idx]) - current_bias
// perform: temp == dot(relevant part of current solution, samples[idx]) - current_bias
scalar_type
temp
=
dot
(
rowm
(
current_solution
,
range
(
i
*
dims
,
(
i
+
1
)
*
dims
-
2
)
),
samples
[
idx
])
-
current_solution
((
i
+
1
)
*
dims
-
1
);
scalar_type
temp
=
dot
(
pointer_to_column_vector
(
&
current_solution
(
i
*
dims
),
dims
-
1
),
samples
[
idx
])
-
current_solution
((
i
+
1
)
*
dims
-
1
);
// Add the LOSS(idx,y) part:
// Add the LOSS(idx,y) part:
if
(
labels
[
idx
]
!=
distinct_labels
[
i
])
if
(
labels
[
idx
]
!=
distinct_labels
[
i
])
...
...
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