diff --git a/ppgan/metric/compute_fid.py b/ppgan/metric/compute_fid.py index 8d000a0d5235daf5cbb27bb5c421caaaad0743f1..c7f8c0a0d4c5b2bb9dc07d769f706e073b6c3452 100644 --- a/ppgan/metric/compute_fid.py +++ b/ppgan/metric/compute_fid.py @@ -23,9 +23,11 @@ import paddle.fluid as fluid from inception import InceptionV3 from paddle.fluid.dygraph.base import to_variable - -def tqdm(x): - return x +try: + from tqdm import tqdm +except: + def tqdm(x): + return x """ based on https://github.com/mit-han-lab/gan-compression/blob/master/metric/fid_score.py