Skip to content

Commit

Permalink
fix a bug where style and noise was being refetched in generator trai…
Browse files Browse the repository at this point in the history
…ning
  • Loading branch information
lucidrains committed Feb 18, 2020
1 parent 8e4ebf8 commit 0b061d4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name = 'stylegan2_pytorch',
packages = find_packages(),
scripts=['bin/stylegan2_pytorch'],
version = '0.4.8',
version = '0.4.9',
license='GPLv3+',
description = 'StyleGan2 in Pytorch',
author = 'Phil Wang',
Expand Down
2 changes: 0 additions & 2 deletions stylegan2_pytorch/stylegan2_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,6 @@ def train(self):
self.GAN.G_opt.zero_grad()
for i in range(self.gradient_accumulate_every):
style, noise = inputs[i]
style = get_latents_fn(batch_size, num_layers, latent_dim)
noise = image_noise(batch_size, image_size)

w_space = latent_to_w(self.GAN.S, style)
w_styles = styles_def_to_tensor(w_space)
Expand Down

0 comments on commit 0b061d4

Please sign in to comment.