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
67a81c1c
Commit
67a81c1c
authored
Apr 10, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made examples work with new fc<> template.
parent
feb81e1f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
dnn_mnist_ex.cpp
examples/dnn_mnist_ex.cpp
+3
-3
dnn_mnist_resnet_ex.cpp
examples/dnn_mnist_resnet_ex.cpp
+3
-3
No files found.
examples/dnn_mnist_ex.cpp
View file @
67a81c1c
...
...
@@ -34,9 +34,9 @@ int main(int argc, char** argv) try
using
net_type
=
loss_multiclass_log
<
fc
<
10
,
FC_HAS_BIAS
,
relu
<
fc
<
84
,
FC_HAS_BIAS
,
relu
<
fc
<
120
,
FC_HAS_BIAS
,
fc
<
10
,
relu
<
fc
<
84
,
relu
<
fc
<
120
,
max_pool
<
2
,
2
,
2
,
2
,
relu
<
con
<
16
,
5
,
5
,
1
,
1
,
max_pool
<
2
,
2
,
2
,
2
,
relu
<
con
<
6
,
5
,
5
,
1
,
1
,
input
<
matrix
<
unsigned
char
>>>>>>>>>>>>>>
;
...
...
examples/dnn_mnist_resnet_ex.cpp
View file @
67a81c1c
...
...
@@ -43,7 +43,7 @@ int main(int argc, char** argv) try
set_dnn_prefer_smallest_algorithms
();
const
unsigned
long
number_of_classes
=
10
;
typedef
loss_multiclass_log
<
fc
<
number_of_classes
,
FC_HAS_BIAS
,
typedef
loss_multiclass_log
<
fc
<
number_of_classes
,
avg_pool
<
11
,
11
,
11
,
11
,
res
<
res
<
res
<
res_down
<
repeat
<
9
,
res
,
// repeat this layer 9 times
...
...
@@ -62,7 +62,7 @@ int main(int argc, char** argv) try
// Let's imagine we wanted to replace some of the relu layers with prelu layers. We
// might do it like this:
typedef
loss_multiclass_log
<
fc
<
number_of_classes
,
FC_HAS_BIAS
,
typedef
loss_multiclass_log
<
fc
<
number_of_classes
,
avg_pool
<
11
,
11
,
11
,
11
,
pres
<
res
<
res
<
res_down
<
// 2 prelu layers here
tag4
<
repeat
<
9
,
pres
,
// 9 groups, each containing 2 prelu layers
...
...
@@ -144,7 +144,7 @@ int main(int argc, char** argv) try
typedef
loss_multiclass_log
<
fc
<
number_of_classes
,
FC_HAS_BIAS
,
typedef
loss_multiclass_log
<
fc
<
number_of_classes
,
avg_pool
<
11
,
11
,
11
,
11
,
ares
<
ares
<
ares
<
ares_down
<
repeat
<
9
,
res
,
...
...
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