This commit is contained in:
Alexander Soare 2024-04-17 09:02:35 +01:00
parent 1331d3b4e4
commit c9454333d8
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ def make_dataset(
transform=Prod(in_keys=clsfunc.image_keys, prod=1 / 255.0),
)
stats = compute_stats(stats_dataset)
os.makedirs(precomputed_stats_path.parent, exist_ok=True)
precomputed_stats_path.parent.mkdir(parents=True, exist_ok=True)
torch.save(stats, precomputed_stats_path)
else:
stats = torch.load(stats_path)