@@ -245,8 +245,8 @@ def __init__(self, lr_D=2e-4, lr_G=2e-4, image_shape=(304, 256, 1),
245
245
#===============================================================================
246
246
# Architecture functions
247
247
248
- def ck (self , x , k , use_normalization ):
249
- x = Conv2D (filters = k , kernel_size = 4 , strides = 2 , padding = 'same' )(x )
248
+ def ck (self , x , k , use_normalization , stride ):
249
+ x = Conv2D (filters = k , kernel_size = 4 , strides = stride , padding = 'same' )(x )
250
250
# Normalization is not done on the first discriminator layer
251
251
if use_normalization :
252
252
x = self .normalization (axis = 3 , center = True , epsilon = 1e-5 )(x , training = True )
@@ -308,13 +308,13 @@ def modelDiscriminator(self, name=None):
308
308
# Specify input
309
309
input_img = Input (shape = self .img_shape )
310
310
# Layer 1 (#Instance normalization is not used for this layer)
311
- x = self .ck (input_img , 64 , False )
311
+ x = self .ck (input_img , 64 , False , 2 )
312
312
# Layer 2
313
- x = self .ck (x , 128 , True )
313
+ x = self .ck (x , 128 , True , 2 )
314
314
# Layer 3
315
- x = self .ck (x , 256 , True )
315
+ x = self .ck (x , 256 , True , 2 )
316
316
# Layer 4
317
- x = self .ck (x , 512 , True )
317
+ x = self .ck (x , 512 , True , 1 )
318
318
# Output layer
319
319
if self .use_patchgan :
320
320
x = Conv2D (filters = 1 , kernel_size = 4 , strides = 1 , padding = 'same' )(x )
0 commit comments