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
5826b562
Commit
5826b562
authored
Jun 05, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed grammar in comments.
parent
f4eab393
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
using_custom_kernels_ex.cpp
examples/using_custom_kernels_ex.cpp
+3
-3
No files found.
examples/using_custom_kernels_ex.cpp
View file @
5826b562
// The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt
// The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt
/*
/*
This is an example showing how to define
d
custom kernel functions for use with
This is an example showing how to define custom kernel functions for use with
the machine learning tools in the dlib C++ Library.
the machine learning tools in the dlib C++ Library.
This example assumes you are somewhat familiar with the machine learning
This example assumes you are somewhat familiar with the machine learning
...
@@ -80,7 +80,7 @@ struct ukf_kernel
...
@@ -80,7 +80,7 @@ struct ukf_kernel
/*
/*
Here we define serialize() and deserialize() functions for our new kernel. Defining
Here we define serialize() and deserialize() functions for our new kernel. Defining
these function is optional. However, if you don't define them you won't be able
these function
s
is optional. However, if you don't define them you won't be able
to save your learned decision_function objects to disk.
to save your learned decision_function objects to disk.
*/
*/
...
@@ -200,7 +200,7 @@ int main()
...
@@ -200,7 +200,7 @@ int main()
// the results are similar. If they are very different then you probably made a
// the results are similar. If they are very different then you probably made a
// mistake. So here we compare the results at a test point.
// mistake. So here we compare the results at a test point.
cout
<<
"
\n
These vectors should match, if they don't then we coded the kernel_derivative wrong!"
<<
endl
;
cout
<<
"
\n
These vectors should match, if they don't then we coded the kernel_derivative wrong!"
<<
endl
;
cout
<<
"approximate derivative:
\n
"
<<
derivative
(
kern
)(
samples
[
0
],
samples
[
100
])
<<
endl
;
cout
<<
"approximate derivative:
\n
"
<<
derivative
(
kern
)(
samples
[
0
],
samples
[
100
])
<<
endl
;
cout
<<
"exact derivative:
\n
"
<<
kernel_derivative
<
kernel_type
>
(
kern
)(
samples
[
0
],
samples
[
100
])
<<
endl
;
cout
<<
"exact derivative:
\n
"
<<
kernel_derivative
<
kernel_type
>
(
kern
)(
samples
[
0
],
samples
[
100
])
<<
endl
;
}
}
...
...
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