fix deprecation warnings in dataloader

This commit is contained in:
harubaru 2022-10-15 18:43:28 -07:00
parent 67140231e7
commit 76efa00de3
1 changed files with 4 additions and 4 deletions

View File

@ -140,10 +140,10 @@ class LocalDanbooruBase(Dataset):
print(f'image-caption map has {len(self.examples.keys())} examples')
self.size = size
self.interpolation = {"linear": PIL.Image.LINEAR,
"bilinear": PIL.Image.BILINEAR,
"bicubic": PIL.Image.BICUBIC,
"lanczos": PIL.Image.LANCZOS,
self.interpolation = {"linear": PIL.Image.Resampling.BILINEAR,
"bilinear": PIL.Image.Resampling.BILINEAR,
"bicubic": PIL.Image.Resampling.BICUBIC,
"lanczos": PIL.Image.Resampling.LANCZOS,
}[interpolation]
self.flip = transforms.RandomHorizontalFlip(p=flip_p)