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
67a81c1c
Commit
67a81c1c
authored
Apr 10, 2016
by
Davis King
Browse files
Made examples work with new fc<> template.
parent
feb81e1f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
examples/dnn_mnist_ex.cpp
examples/dnn_mnist_ex.cpp
+3
-3
examples/dnn_mnist_resnet_ex.cpp
examples/dnn_mnist_resnet_ex.cpp
+4
-4
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