Skip to content

Commit

Permalink
Merge pull request GaParmar#34 from YotamNitzan/main
Browse files Browse the repository at this point in the history
Save custom stats in lowercase to match the loading code
  • Loading branch information
GaParmar authored Aug 1, 2022
2 parents 3cdadba + 471d683 commit 18bcb63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cleanfid/fid.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def make_custom_stats(name, fdir, num=None, mode="clean",
stats_folder = os.path.join(os.path.dirname(cleanfid.__file__), "stats")
os.makedirs(stats_folder, exist_ok=True)
split, res = "custom", "na"
outname = f"{name}_{mode}_{split}_{res}.npz"
outname = f"{name}_{mode}_{split}_{res}.npz".lower()
outf = os.path.join(stats_folder, outname)
# if the custom stat file already exists
if os.path.exists(outf):
Expand All @@ -343,7 +343,7 @@ def make_custom_stats(name, fdir, num=None, mode="clean",
print(f"saving custom FID stats to {outf}")
np.savez_compressed(outf, mu=mu, sigma=sigma)
# KID stats
outf = os.path.join(stats_folder, f"{name}_{mode}_{split}_{res}_kid.npz")
outf = os.path.join(stats_folder, f"{name}_{mode}_{split}_{res}_kid.npz".lower())
print(f"saving custom KID stats to {outf}")
np.savez_compressed(outf, feats=np_feats)

Expand Down

0 comments on commit 18bcb63

Please sign in to comment.