Example #1
0
 def test_create(self):
     with self.test_session():
         remove_d_config = hg.Configuration.default()
         remove_d_config['discriminator'] = None
         remove_d_config['loss'] = None
         remove_d_config['trainer'] = None
         gan = mock_gan(config=remove_d_config)
         discriminator = AutoencoderDiscriminator(gan, config)
         gan.encoder = gan.create_component(gan.config.encoder)
         gan.encoder.create()
         gan.generator = gan.create_component(gan.config.generator)
         gan.generator.create()
         net = discriminator.create()
         gan.create()
         self.assertEqual(int(net.get_shape()[1]), 32)
Example #2
0
 def test_config(self):
     with self.test_session():
         gan = mock_gan()
         discriminator = AutoencoderDiscriminator(gan, config)
         self.assertEqual(discriminator.config.activation, tf.nn.tanh)