Last active
June 27, 2021 18:00
-
-
Save J3698/fa16569397dfbdc5e75c9fc2b370bf2f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IterableStyleTransferDataset(IterableDataset): | |
def __init__(self, coco_path, coco_annotations, \ | |
wiki_path, length = 100000, transform = None, rng_seed = 1, exclude_style = False): | |
self.wiki = ImageFolder(wiki_path, transform = transform) | |
self.coco = CocoCaptions(coco_path, coco_annotations, transform = transform) | |
self.length = length | |
self.exclude_style = exclude_style | |
self.seed = rng_seed | |
self.random = random.Random(rng_seed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment