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
a13aea26
"examples/pytorch/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "3c129ad71f684e3cdd9b415b431bd899fcdb443e"
Commit
a13aea26
authored
May 04, 2014
by
Davis King
Browse files
Fixed compiler errors in unit tests
parent
b99cffef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
dlib/test/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
...
@@ -446,7 +446,10 @@ namespace
typedef
matrix
<
scalar_type
,
0
,
1
>
w_type
;
typedef
matrix
<
scalar_type
,
0
,
1
>
w_type
;
w_type
weights
;
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_max_cache_size
(
3
);
problem
.
set_c
(
C
);
problem
.
set_c
(
C
);
...
@@ -460,10 +463,7 @@ namespace
...
@@ -460,10 +463,7 @@ namespace
svm_objective
=
solver
(
problem
,
weights
);
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
.
weights
=
colm
(
reshape
(
weights
,
df
.
labels
.
size
(),
dims
+
1
),
range
(
0
,
dims
-
1
));
df
.
b
=
colm
(
reshape
(
weights
,
df
.
labels
.
size
(),
dims
+
1
),
dims
);
df
.
b
=
colm
(
reshape
(
weights
,
df
.
labels
.
size
(),
dims
+
1
),
dims
);
return
df
;
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