fix deprecation warnings in dataloader
This commit is contained in:
parent
67140231e7
commit
76efa00de3
|
@ -140,10 +140,10 @@ class LocalDanbooruBase(Dataset):
|
||||||
print(f'image-caption map has {len(self.examples.keys())} examples')
|
print(f'image-caption map has {len(self.examples.keys())} examples')
|
||||||
|
|
||||||
self.size = size
|
self.size = size
|
||||||
self.interpolation = {"linear": PIL.Image.LINEAR,
|
self.interpolation = {"linear": PIL.Image.Resampling.BILINEAR,
|
||||||
"bilinear": PIL.Image.BILINEAR,
|
"bilinear": PIL.Image.Resampling.BILINEAR,
|
||||||
"bicubic": PIL.Image.BICUBIC,
|
"bicubic": PIL.Image.Resampling.BICUBIC,
|
||||||
"lanczos": PIL.Image.LANCZOS,
|
"lanczos": PIL.Image.Resampling.LANCZOS,
|
||||||
}[interpolation]
|
}[interpolation]
|
||||||
self.flip = transforms.RandomHorizontalFlip(p=flip_p)
|
self.flip = transforms.RandomHorizontalFlip(p=flip_p)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue