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
9 years ago
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A bit more cleanup
parent
47bdf95f
master
v19.17
v19.16
v19.15
v19.14
v19.13
v19.12
v19.11
v19.10
v19.9
v19.8
v19.7
v19.6
v19.5
v19.4
v19.3
v19.2
v19.1
v19.0
before_dnn_serialization_cleanup
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
dnn_mnist_resnet_ex.cpp
examples/dnn_mnist_resnet_ex.cpp
+7
-2
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,7 +25,10 @@ std::tuple<relu_,add_prev1_,bn_,con_,relu_,bn_,con_> res_ (
...
@@ -24,7 +25,10 @@ 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
{
{
if
(
argc
!=
2
)
if
(
argc
!=
2
)
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
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