mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Show how to use the new visitors with lambdas (#2162)
This commit is contained in:
parent
393db2490b
commit
5ec60a91c4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user