upd PatchDiscriminator

This commit is contained in:
iperov 2020-12-31 17:38:41 +04:00
parent 2339a9ab09
commit ad5733c5bb
2 changed files with 5 additions and 5 deletions

View File

@ -152,17 +152,17 @@ class UNetPatchDiscriminator(nn.ModelBase):
self.center_conv = nn.Conv2D( level_chs[len(layers)-1], level_chs[len(layers)-1], kernel_size=1, padding='VALID')
def forward(self, x):
x = tf.nn.leaky_relu( self.in_conv(x), 0.1 )
x = tf.nn.leaky_relu( self.in_conv(x), 0.2 )
encs = []
for conv in self.convs:#, self.res):
encs.insert(0, x)
x = tf.nn.leaky_relu( conv(x), 0.1 )
x = tf.nn.leaky_relu( conv(x), 0.2 )
center_out, x = self.center_out(x), self.center_conv(x)
center_out, x = self.center_out(x), tf.nn.leaky_relu( self.center_conv(x), 0.2 )
for i, (upconv, enc,) in enumerate(zip(self.upconvs, encs)):# self.upres
x = tf.nn.leaky_relu( upconv(x), 0.1 )
x = tf.nn.leaky_relu( upconv(x), 0.2 )
x = tf.concat( [enc, x], axis=nn.conv2d_ch_axis)
return center_out, self.out_conv(x)

View File

@ -155,7 +155,7 @@ Examples: df, liae, df-d, df-ud, liae-ud, ...
gan_patch_size = np.clip ( io.input_int("GAN patch size", default_gan_patch_size, add_info="3-640", help_message="The higher patch size, the higher the quality, the more VRAM is required. Typical fine value is resolution / 8." ), 3, 640 )
self.options['gan_patch_size'] = gan_patch_size
gan_dims = np.clip ( io.input_int("GAN dimensions", default_gan_dims, add_info="16-512", help_message="The higher dims, the higher the quality, the more VRAM is required. The more varied the src faceset, especially if ct_mode is enabled, the more GAN dimensions are needed. Typical fine value is 32." ), 16, 512 )
gan_dims = np.clip ( io.input_int("GAN dimensions", default_gan_dims, add_info="16-512", help_message="Change this value only if you want to experiment. Typical fine value is 32." ), 16, 512 )
self.options['gan_dims'] = gan_dims
if 'df' in self.options['archi']: