From 5916f5f7d4abffe5aef9cd0b0f8981020d9a3d61 Mon Sep 17 00:00:00 2001 From: James Betker Date: Mon, 4 Jan 2021 10:53:53 -0700 Subject: [PATCH] Misc fixes --- codes/models/discriminator_vgg_arch.py | 2 +- codes/models/stylegan/stylegan2_lucidrains.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/codes/models/discriminator_vgg_arch.py b/codes/models/discriminator_vgg_arch.py index f6fa50a4..a9c1572e 100644 --- a/codes/models/discriminator_vgg_arch.py +++ b/codes/models/discriminator_vgg_arch.py @@ -168,7 +168,7 @@ class Discriminator_VGG_128_GN(nn.Module): @register_model -def register_discriminator_vgg_128(opt_net, opt): +def register_discriminator_vgg_128_gn(opt_net, opt): return Discriminator_VGG_128_GN(in_nc=opt_net['in_nc'], nf=opt_net['nf'], input_img_factor=opt_net['image_size'] / 128, extra_conv=opt_get(opt_net, ['extra_conv'], False), diff --git a/codes/models/stylegan/stylegan2_lucidrains.py b/codes/models/stylegan/stylegan2_lucidrains.py index a10f890a..06517add 100644 --- a/codes/models/stylegan/stylegan2_lucidrains.py +++ b/codes/models/stylegan/stylegan2_lucidrains.py @@ -811,6 +811,7 @@ class StyleGan2Discriminator(nn.Module): self.flatten = Flatten() if mlp: self.to_logit = nn.Sequential(nn.Linear(latent_dim, 100), + leaky_relu(), nn.Linear(100, 1)) else: self.to_logit = nn.Linear(latent_dim, 1)