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
e3cd91ce
Commit
e3cd91ce
authored
Dec 16, 2012
by
Davis King
Browse files
Fixed bugs in new object.
parent
a121906f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dlib/svm/svm_c_linear_dcd_trainer.h
dlib/svm/svm_c_linear_dcd_trainer.h
+3
-3
No files found.
dlib/svm/svm_c_linear_dcd_trainer.h
View file @
e3cd91ce
...
@@ -266,14 +266,14 @@ namespace dlib
...
@@ -266,14 +266,14 @@ namespace dlib
// weight to the end of the resulting vector.
// weight to the end of the resulting vector.
w
=
join_cols
(
join_cols
(
w
=
join_cols
(
join_cols
(
colm
(
w
,
0
,
dims
),
colm
(
w
,
0
,
dims
),
zeros_matrix
<
scalar_type
>
(
1
,
new_dims
-
dims
)),
zeros_matrix
<
scalar_type
>
(
new_dims
-
dims
,
1
)),
uniform_matrix
<
scalar_type
>
(
1
,
1
,
w
(
dims
))
uniform_matrix
<
scalar_type
>
(
1
,
1
,
w
(
dims
))
);
);
}
}
else
else
{
{
// Just concatenate the right number of zeros.
// Just concatenate the right number of zeros.
w
=
join_cols
(
w
,
zeros_matrix
<
scalar_type
>
(
1
,
new_dims
-
dims
));
w
=
join_cols
(
w
,
zeros_matrix
<
scalar_type
>
(
new_dims
-
dims
,
1
));
}
}
dims
=
new_dims
;
dims
=
new_dims
;
}
}
...
@@ -416,7 +416,7 @@ namespace dlib
...
@@ -416,7 +416,7 @@ namespace dlib
<<
"
\n\t
y.size(): "
<<
y
.
size
()
<<
"
\n\t
y.size(): "
<<
y
.
size
()
<<
"
\n\t
is_learning_problem(x,y): "
<<
is_learning_problem
(
x
,
y
)
<<
"
\n\t
is_learning_problem(x,y): "
<<
is_learning_problem
(
x
,
y
)
);
);
#if ENABLE_ASSERTS
#if
def
ENABLE_ASSERTS
for
(
long
i
=
0
;
i
<
x
.
size
();
++
i
)
for
(
long
i
=
0
;
i
<
x
.
size
();
++
i
)
{
{
DLIB_ASSERT
(
y
(
i
)
==
+
1
||
y
(
i
)
==
-
1
,
DLIB_ASSERT
(
y
(
i
)
==
+
1
||
y
(
i
)
==
-
1
,
...
...
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