Skip to content

Commit

Permalink
make pytorch-fid package optional
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Dec 27, 2020
1 parent 5d12685 commit f1356a3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lightweight_gan/lightweight_gan.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

from tqdm import tqdm
from einops import rearrange
from pytorch_fid import fid_score

from adabelief_pytorch import AdaBelief
from gsa_pytorch import GSA
Expand Down Expand Up @@ -1139,6 +1138,7 @@ def evaluate(self, num = 0, num_image_tiles = 8, trunc = 1.0):

@torch.no_grad()
def calculate_fid(self, num_batches):
from pytorch_fid import fid_score
torch.cuda.empty_cache()

real_path = str(self.results_dir / self.name / 'fid_real') + '/'
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.14.1'
__version__ = '0.14.2'
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
'kornia',
'numpy',
'pillow',
'pytorch-fid',
'retry',
'scipy',
'torch>=1.6',
Expand Down

0 comments on commit f1356a3

Please sign in to comment.