Skip to content

Commit

Permalink
fix scipy version Error
Browse files Browse the repository at this point in the history
fix Error can not import name 'imread' from 'scipy.misc'
  • Loading branch information
Johnson-yue authored Aug 3, 2020
1 parent 0e4411b commit ca6aafa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stylegan/metric/fid_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
import numpy as np
import torch
from scipy import linalg
from scipy.misc import imread
try:
from scipy.misc import imread
except:
from imageio import imread
from torch.nn.functional import adaptive_avg_pool2d

try:
Expand Down Expand Up @@ -245,4 +248,4 @@ def calculate_fid_given_paths(paths, batch_size, cuda, dims):
args.batch_size,
args.gpu != '',
args.dims)
print('FID: ', fid_value)
print('FID: ', fid_value)

0 comments on commit ca6aafa

Please sign in to comment.