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
030f5a0a
Commit
030f5a0a
authored
Mar 27, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A bit more cleanup
parent
47bdf95f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
dnn_mnist_resnet_ex.cpp
examples/dnn_mnist_resnet_ex.cpp
+6
-1
No files found.
examples/dnn_mnist_resnet_ex.cpp
View file @
030f5a0a
...
@@ -7,9 +7,10 @@
...
@@ -7,9 +7,10 @@
using
namespace
std
;
using
namespace
std
;
using
namespace
dlib
;
using
namespace
dlib
;
template
<
typename
T
>
using
ares
=
relu
<
add_prev1
<
affine
<
con
<
relu
<
affine
<
con
<
tag1
<
T
>>>>>>>>
;
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
using
res
=
relu
<
add_prev1
<
bn
<
con
<
relu
<
bn
<
con
<
tag1
<
T
>>>>>>>>
;
template
<
typename
T
>
using
res
=
relu
<
add_prev1
<
bn
<
con
<
relu
<
bn
<
con
<
tag1
<
T
>>>>>>>>
;
std
::
tuple
<
relu_
,
add_prev1_
,
bn_
,
con_
,
relu_
,
bn_
,
con_
>
res_
(
std
::
tuple
<
relu_
,
add_prev1_
,
bn_
,
con_
,
relu_
,
bn_
,
con_
>
res_
(
unsigned
long
outputs
,
unsigned
long
outputs
,
unsigned
long
stride
=
1
unsigned
long
stride
=
1
...
@@ -24,6 +25,9 @@ std::tuple<relu_,add_prev1_,bn_,con_,relu_,bn_,con_> res_ (
...
@@ -24,6 +25,9 @@ std::tuple<relu_,add_prev1_,bn_,con_,relu_,bn_,con_> res_ (
con_
(
outputs
,
3
,
3
,
stride
,
stride
));
con_
(
outputs
,
3
,
3
,
stride
,
stride
));
}
}
template
<
typename
T
>
using
ares
=
relu
<
add_prev1
<
affine
<
con
<
relu
<
affine
<
con
<
tag1
<
T
>>>>>>>>
;
// ----------------------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
try
int
main
(
int
argc
,
char
**
argv
)
try
{
{
...
@@ -87,6 +91,7 @@ int main(int argc, char** argv) try
...
@@ -87,6 +91,7 @@ int main(int argc, char** argv) try
// You can access sub layers of the network like this:
// You can access sub layers of the network like this:
net
.
subnet
().
subnet
().
get_output
();
net
.
subnet
().
subnet
().
get_output
();
layer
<
2
>
(
net
).
get_output
();
layer
<
avg_pool
>
(
net
).
get_output
();
layer
<
avg_pool
>
(
net
).
get_output
();
net
.
clean
();
net
.
clean
();
...
...
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