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
1e70c721
Commit
1e70c721
authored
May 07, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made example use the "everything" version of avg pooling.
parent
f6695521
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 @
1e70c721
...
@@ -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
<
6
,
6
,
11
,
11
,
avg_pool
_everything
<
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
<
6
,
6
,
11
,
11
,
avg_pool
_everything
<
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=
6, nc=6, stride_y=11, _stride_x=11
)
layer<2> avg_pool (nr=
0, nc=0, stride_y=1, stride_x=1, padding_y=0, padding_x=0
)
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
<
6
,
6
,
11
,
11
,
avg_pool
_everything
<
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