Unverified Commit 5ec60a91 authored by Adrià Arrufat's avatar Adrià Arrufat Committed by GitHub
Browse files

Show how to use the new visitors with lambdas (#2162)

parent 393db249
......@@ -130,7 +130,9 @@ int main(int argc, char** argv) try
// Instantiate both generator and discriminator
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
set_all_bn_inputs_no_bias(generator);
set_all_bn_inputs_no_bias(discriminator);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment