Skip to content

Commit

Permalink
use device from latents
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jan 13, 2021
1 parent 7c16bed commit 8643aab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lightweight_gan/lightweight_gan.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ def calculate_fid(self, num_batches):
for j in range(generated_images.size(0)):
torchvision.utils.save_image(generated_images[j, :, :, :], str(Path(fake_path) / f'{str(j + batch_num * self.batch_size)}-ema.{ext}'))

return fid_score.calculate_fid_given_paths([real_path, fake_path], 256, True, 2048)
return fid_score.calculate_fid_given_paths([real_path, fake_path], 256, latents.device, 2048)

@torch.no_grad()
def generate_truncated(self, G, style, trunc_psi = 0.75, num_image_tiles = 8):
Expand Down
2 changes: 1 addition & 1 deletion lightweight_gan/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.16.2'
__version__ = '0.16.3'

0 comments on commit 8643aab

Please sign in to comment.