@@ -46,7 +46,7 @@ def generator(noise, is_training=True):
46
46
Returns:
47
47
A single Tensor with a batch of generated CIFAR images.
48
48
"""
49
- images , _ = dcgan .generator (noise , is_training = is_training )
49
+ images , _ = dcgan .generator (noise , is_training = is_training , fused_batch_norm = True )
50
50
51
51
# Make sure output lies between [-1, 1].
52
52
return tf .tanh (images )
@@ -68,7 +68,7 @@ def conditional_generator(inputs, is_training=True):
68
68
noise , one_hot_labels = inputs
69
69
noise = tfgan .features .condition_tensor_from_onehot (noise , one_hot_labels )
70
70
71
- images , _ = dcgan .generator (noise , is_training = is_training )
71
+ images , _ = dcgan .generator (noise , is_training = is_training , fused_batch_norm = True )
72
72
73
73
# Make sure output lies between [-1, 1].
74
74
return tf .tanh (images )
@@ -94,7 +94,7 @@ def discriminator(img, unused_conditioning, is_training=True):
94
94
images are real. The output can lie in [-inf, inf], with positive values
95
95
indicating high confidence that the images are real.
96
96
"""
97
- logits , _ = dcgan .discriminator (img , is_training = is_training )
97
+ logits , _ = dcgan .discriminator (img , is_training = is_training , fused_batch_norm = True )
98
98
return logits
99
99
100
100
@@ -118,7 +118,7 @@ def conditional_discriminator(img, conditioning, is_training=True):
118
118
images are real. The output can lie in [-inf, inf], with positive values
119
119
indicating high confidence that the images are real.
120
120
"""
121
- logits , end_points = dcgan .discriminator (img , is_training = is_training )
121
+ logits , end_points = dcgan .discriminator (img , is_training = is_training , fused_batch_norm = True )
122
122
123
123
# Condition the last convolution layer.
124
124
_ , one_hot_labels = conditioning
0 commit comments