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
5ec60a91
"git@developer.sourcefind.cn:OpenDAS/dlib.git" did not exist on "d1253dbdfc96d3fd5098196eec6826be8df4f53b"
Unverified
Commit
5ec60a91
authored
Sep 06, 2020
by
Adrià Arrufat
Committed by
GitHub
Sep 06, 2020
Browse files
Show how to use the new visitors with lambdas (#2162)
parent
393db249
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
examples/dnn_dcgan_train_ex.cpp
examples/dnn_dcgan_train_ex.cpp
+3
-1
No files found.
examples/dnn_dcgan_train_ex.cpp
View file @
5ec60a91
...
@@ -130,7 +130,9 @@ int main(int argc, char** argv) try
...
@@ -130,7 +130,9 @@ int main(int argc, char** argv) try
// Instantiate both generator and discriminator
// Instantiate both generator and discriminator
generator_type
generator
;
generator_type
generator
;
discriminator_type
discriminator
(
leaky_relu_
(
0.2
),
leaky_relu_
(
0.2
),
leaky_relu_
(
0.2
));
discriminator_type
discriminator
;
// setup all leaky_relu_ layers in the discriminator to have alpha = 0.2
visit_computational_layers
(
discriminator
,
[](
leaky_relu_
&
l
){
l
=
leaky_relu_
(
0.2
);
});
// Remove the bias learning from all bn_ inputs in both networks
// Remove the bias learning from all bn_ inputs in both networks
set_all_bn_inputs_no_bias
(
generator
);
set_all_bn_inputs_no_bias
(
generator
);
set_all_bn_inputs_no_bias
(
discriminator
);
set_all_bn_inputs_no_bias
(
discriminator
);
...
...
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