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
482b3a61
Commit
482b3a61
authored
Oct 02, 2016
by
Davis King
Browse files
Simplified the network definition slightly
parent
0beabe84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
examples/dnn_mmod_ex.cpp
examples/dnn_mmod_ex.cpp
+3
-3
No files found.
examples/dnn_mmod_ex.cpp
View file @
482b3a61
...
@@ -55,16 +55,16 @@ template <long num_filters, typename SUBNET> using con3 = con<num_filters,3,3,1
...
@@ -55,16 +55,16 @@ template <long num_filters, typename SUBNET> using con3 = con<num_filters,3,3,1
// Now we can define the 8x downsampling block in terms of conv5d blocks. We
// Now we can define the 8x downsampling block in terms of conv5d blocks. We
// also use relu and batch normalization in the standard way.
// also use relu and batch normalization in the standard way.
template
<
unsigned
long
N
,
typename
SUBNET
>
using
downsampler
=
relu
<
bn_con
<
con5d
<
N
,
relu
<
bn_con
<
con5d
<
N
,
relu
<
bn_con
<
con5d
<
N
,
SUBNET
>>>>>>>>>
;
template
<
typename
SUBNET
>
using
downsampler
=
relu
<
bn_con
<
con5d
<
32
,
relu
<
bn_con
<
con5d
<
32
,
relu
<
bn_con
<
con5d
<
32
,
SUBNET
>>>>>>>>>
;
// The rest of the network will be 3x3 conv layers with batch normalization and
// The rest of the network will be 3x3 conv layers with batch normalization and
// relu. So we define the 3x3 block we will use here.
// relu. So we define the 3x3 block we will use here.
template
<
unsigned
long
N
,
typename
SUBNET
>
using
rcon3
=
relu
<
bn_con
<
con3
<
N
,
SUBNET
>>>
;
template
<
typename
SUBNET
>
using
rcon3
=
relu
<
bn_con
<
con3
<
32
,
SUBNET
>>>
;
// Finally, we define the entire network. The special input_rgb_image_pyramid
// Finally, we define the entire network. The special input_rgb_image_pyramid
// layer causes the network to operate over a spatial pyramid, making the detector
// layer causes the network to operate over a spatial pyramid, making the detector
// scale invariant.
// scale invariant.
using
net_type
=
loss_mmod
<
con
<
1
,
6
,
6
,
1
,
1
,
rcon3
<
32
,
rcon3
<
32
,
rcon3
<
32
,
downsampler
<
32
,
input_rgb_image_pyramid
<
pyramid_down
<
6
>>>>>>>>
;
using
net_type
=
loss_mmod
<
con
<
1
,
6
,
6
,
1
,
1
,
rcon3
<
rcon3
<
rcon3
<
downsampler
<
input_rgb_image_pyramid
<
pyramid_down
<
6
>>>>>>>>
;
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
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