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
d4958e8a
Commit
d4958e8a
authored
Oct 08, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Evgeniy Fominov's changes that avoid compiler bugs in Visual Studio.
parent
c22b94c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
15 deletions
+29
-15
dnn_imagenet_ex.cpp
examples/dnn_imagenet_ex.cpp
+9
-5
dnn_imagenet_train_ex.cpp
examples/dnn_imagenet_train_ex.cpp
+20
-10
No files found.
examples/dnn_imagenet_ex.cpp
View file @
d4958e8a
...
...
@@ -47,15 +47,19 @@ using block = BN<con<N,3,3,1,1,relu<BN<con<N,3,3,stride,stride,SUBNET>>>>>;
template
<
int
N
,
typename
SUBNET
>
using
ares
=
relu
<
residual
<
block
,
N
,
affine
,
SUBNET
>>
;
template
<
int
N
,
typename
SUBNET
>
using
ares_down
=
relu
<
residual_down
<
block
,
N
,
affine
,
SUBNET
>>
;
template
<
typename
SUBNET
>
using
level1
=
ares
<
512
,
ares
<
512
,
ares_down
<
512
,
SUBNET
>>>
;
template
<
typename
SUBNET
>
using
level2
=
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares_down
<
256
,
SUBNET
>>>>>>
;
template
<
typename
SUBNET
>
using
level3
=
ares
<
128
,
ares
<
128
,
ares
<
128
,
ares_down
<
128
,
SUBNET
>>>>
;
template
<
typename
SUBNET
>
using
level4
=
ares
<
64
,
ares
<
64
,
ares
<
64
,
SUBNET
>>>
;
using
anet_type
=
loss_multiclass_log
<
fc
<
1000
,
avg_pool_everything
<
ares
<
512
,
ares
<
512
,
ares_down
<
512
,
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares_down
<
256
,
ares
<
128
,
ares
<
128
,
ares
<
128
,
ares_down
<
128
,
ares
<
64
,
ares
<
64
,
ares
<
64
,
level1
<
level2
<
level3
<
level4
<
max_pool
<
3
,
3
,
2
,
2
,
relu
<
affine
<
con
<
64
,
7
,
7
,
2
,
2
,
input_rgb_image_sized
<
227
>
>>>>>>>>>>>
>>>>>>>>>>>>
;
>>>>>>>>>>>
;
// ----------------------------------------------------------------------------------------
...
...
examples/dnn_imagenet_train_ex.cpp
View file @
d4958e8a
...
...
@@ -40,25 +40,35 @@ template <int N, typename SUBNET> using ares_down = relu<residual_down<block,N,a
// ----------------------------------------------------------------------------------------
template
<
typename
SUBNET
>
using
level1
=
res
<
512
,
res
<
512
,
res_down
<
512
,
SUBNET
>>>
;
template
<
typename
SUBNET
>
using
level2
=
res
<
256
,
res
<
256
,
res
<
256
,
res
<
256
,
res
<
256
,
res_down
<
256
,
SUBNET
>>>>>>
;
template
<
typename
SUBNET
>
using
level3
=
res
<
128
,
res
<
128
,
res
<
128
,
res_down
<
128
,
SUBNET
>>>>
;
template
<
typename
SUBNET
>
using
level4
=
res
<
64
,
res
<
64
,
res
<
64
,
SUBNET
>>>
;
template
<
typename
SUBNET
>
using
alevel1
=
ares
<
512
,
ares
<
512
,
ares_down
<
512
,
SUBNET
>>>
;
template
<
typename
SUBNET
>
using
alevel2
=
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares_down
<
256
,
SUBNET
>>>>>>
;
template
<
typename
SUBNET
>
using
alevel3
=
ares
<
128
,
ares
<
128
,
ares
<
128
,
ares_down
<
128
,
SUBNET
>>>>
;
template
<
typename
SUBNET
>
using
alevel4
=
ares
<
64
,
ares
<
64
,
ares
<
64
,
SUBNET
>>>
;
// training network type
using
net_type
=
loss_multiclass_log
<
fc
<
1000
,
avg_pool_everything
<
res
<
512
,
res
<
512
,
res_down
<
512
,
res
<
256
,
res
<
256
,
res
<
256
,
res
<
256
,
res
<
256
,
res_down
<
256
,
res
<
128
,
res
<
128
,
res
<
128
,
res_down
<
128
,
res
<
64
,
res
<
64
,
res
<
64
,
level1
<
level2
<
level3
<
level4
<
max_pool
<
3
,
3
,
2
,
2
,
relu
<
bn_con
<
con
<
64
,
7
,
7
,
2
,
2
,
input_rgb_image_sized
<
227
>
>>>>>>>>>>>
>>>>>>>>>>>>
;
>>>>>>>>>>>
;
// testing network type (replaced batch normalization with fixed affine transforms)
using
anet_type
=
loss_multiclass_log
<
fc
<
1000
,
avg_pool_everything
<
a
res
<
512
,
ares
<
512
,
ares_down
<
512
,
a
res
<
256
,
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares
<
256
,
ares_down
<
256
,
a
res
<
128
,
ares
<
128
,
ares
<
128
,
ares_down
<
128
,
a
res
<
64
,
ares
<
64
,
ares
<
64
,
a
level1
<
a
level2
<
a
level3
<
a
level4
<
max_pool
<
3
,
3
,
2
,
2
,
relu
<
affine
<
con
<
64
,
7
,
7
,
2
,
2
,
input_rgb_image_sized
<
227
>
>>>>>>>>>>>
>>>>>>>>>>>>
;
>>>>>>>>>>>
;
// ----------------------------------------------------------------------------------------
...
...
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