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
4a763305
Commit
4a763305
authored
May 05, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed avg pooling filter sizes to avoid errors with the new rules about
non-one based strides.
parent
e4d70f8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
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>;
// large networks.
const
unsigned
long
number_of_classes
=
10
;
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
<
repeat
<
9
,
res
,
// repeat this layer 9 times
res_down
<
...
...
@@ -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
// prelu layers. We might do it like this:
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
tag4
<
repeat
<
9
,
pres
,
// 9 groups, each containing 2 prelu layers
res_down
<
...
...
@@ -144,7 +144,7 @@ int main(int argc, char** argv) try
The pnet has 125 layers in it.
layer<0> loss_multiclass_log
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<4> add_prev
layer<5> bn_con
...
...
@@ -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
// normalization layers replaced with affine. For example:
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
<
repeat
<
9
,
res
,
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