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
030f5a0a
Commit
030f5a0a
authored
Mar 27, 2016
by
Davis King
Browse files
A bit more cleanup
parent
47bdf95f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
examples/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,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