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
4a763305
Commit
4a763305
authored
May 04, 2016
by
Davis King
Browse files
Fixed avg pooling filter sizes to avoid errors with the new rules about
non-one based strides.
parent
e4d70f8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
examples/dnn_mnist_advanced_ex.cpp
examples/dnn_mnist_advanced_ex.cpp
+4
-4
No files found.
examples/dnn_mnist_advanced_ex.cpp
View file @
4a763305
...
@@ -61,7 +61,7 @@ template <typename SUBNET> using ares_down = base_ares<2,SUBNET>;
...
@@ -61,7 +61,7 @@ template <typename SUBNET> using ares_down = base_ares<2,SUBNET>;
// large networks.
// large networks.
const
unsigned
long
number_of_classes
=
10
;
const
unsigned
long
number_of_classes
=
10
;
using
net_type
=
loss_multiclass_log
<
fc
<
number_of_classes
,
using
net_type
=
loss_multiclass_log
<
fc
<
number_of_classes
,
avg_pool
<
11
,
11
,
11
,
11
,
avg_pool
<
6
,
6
,
11
,
11
,
res
<
res
<
res
<
res_down
<
res
<
res
<
res
<
res_down
<
repeat
<
9
,
res
,
// repeat this layer 9 times
repeat
<
9
,
res
,
// repeat this layer 9 times
res_down
<
res_down
<
...
@@ -114,7 +114,7 @@ int main(int argc, char** argv) try
...
@@ -114,7 +114,7 @@ int main(int argc, char** argv) try
// Now, let's imagine we wanted to replace some of the relu layers with
// Now, let's imagine we wanted to replace some of the relu layers with
// prelu layers. We might do it like this:
// prelu layers. We might do it like this:
using
net_type2
=
loss_multiclass_log
<
fc
<
number_of_classes
,
using
net_type2
=
loss_multiclass_log
<
fc
<
number_of_classes
,
avg_pool
<
11
,
11
,
11
,
11
,
avg_pool
<
6
,
6
,
11
,
11
,
pres
<
res
<
res
<
res_down
<
// 2 prelu layers here
pres
<
res
<
res
<
res_down
<
// 2 prelu layers here
tag4
<
repeat
<
9
,
pres
,
// 9 groups, each containing 2 prelu layers
tag4
<
repeat
<
9
,
pres
,
// 9 groups, each containing 2 prelu layers
res_down
<
res_down
<
...
@@ -144,7 +144,7 @@ int main(int argc, char** argv) try
...
@@ -144,7 +144,7 @@ int main(int argc, char** argv) try
The pnet has 125 layers in it.
The pnet has 125 layers in it.
layer<0> loss_multiclass_log
layer<0> loss_multiclass_log
layer<1> fc (num_outputs=10)
layer<1> fc (num_outputs=10)
layer<2> avg_pool (nr=
11
, nc=
11
, stride_y=11, _stride_x=11)
layer<2> avg_pool (nr=
6
, nc=
6
, stride_y=11, _stride_x=11)
layer<3> prelu (initial_param_value=0.2)
layer<3> prelu (initial_param_value=0.2)
layer<4> add_prev
layer<4> add_prev
layer<5> bn_con
layer<5> bn_con
...
@@ -268,7 +268,7 @@ int main(int argc, char** argv) try
...
@@ -268,7 +268,7 @@ int main(int argc, char** argv) try
// making a network type which is identical to net_type but with the batch
// making a network type which is identical to net_type but with the batch
// normalization layers replaced with affine. For example:
// normalization layers replaced with affine. For example:
using
test_net_type
=
loss_multiclass_log
<
fc
<
number_of_classes
,
using
test_net_type
=
loss_multiclass_log
<
fc
<
number_of_classes
,
avg_pool
<
11
,
11
,
11
,
11
,
avg_pool
<
6
,
6
,
11
,
11
,
ares
<
ares
<
ares
<
ares_down
<
ares
<
ares
<
ares
<
ares_down
<
repeat
<
9
,
res
,
repeat
<
9
,
res
,
ares_down
<
ares_down
<
...
...
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