Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
a13aea26
Commit
a13aea26
authored
May 05, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compiler errors in unit tests
parent
b99cffef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
svm_struct.cpp
dlib/test/svm_struct.cpp
+4
-4
No files found.
dlib/test/svm_struct.cpp
View file @
a13aea26
...
...
@@ -446,7 +446,10 @@ namespace
typedef
matrix
<
scalar_type
,
0
,
1
>
w_type
;
w_type
weights
;
multiclass_svm_problem
<
w_type
,
sample_type
,
label_type
>
problem
(
all_samples
,
all_labels
,
4
);
const
long
dims
=
max_index_plus_one
(
all_samples
);
trained_function_type
df
;
df
.
labels
=
select_all_distinct_labels
(
all_labels
);
multiclass_svm_problem
<
w_type
,
sample_type
,
label_type
>
problem
(
all_samples
,
all_labels
,
df
.
labels
,
dims
,
4
);
problem
.
set_max_cache_size
(
3
);
problem
.
set_c
(
C
);
...
...
@@ -460,10 +463,7 @@ namespace
svm_objective
=
solver
(
problem
,
weights
);
trained_function_type
df
;
const
long
dims
=
max_index_plus_one
(
all_samples
);
df
.
labels
=
select_all_distinct_labels
(
all_labels
);
df
.
weights
=
colm
(
reshape
(
weights
,
df
.
labels
.
size
(),
dims
+
1
),
range
(
0
,
dims
-
1
));
df
.
b
=
colm
(
reshape
(
weights
,
df
.
labels
.
size
(),
dims
+
1
),
dims
);
return
df
;
...
...
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