mirror of
https://github.com/lucidrains/DALLE2-pytorch.git
synced 2025-12-20 02:04:19 +01:00
Prior updates (#211)
* update configs for prior add prior warmup to config update example prior config * update prior trainer & script add deepspeed amp & warmup adopt full accelerator support reload at sample point finish epoch resume code * update tracker save method for prior * helper functions for prior_loader
This commit is contained in:
@@ -67,6 +67,15 @@ class PriorEmbeddingDataset(IterableDataset):
|
||||
def __str__(self):
|
||||
return f"<PriorEmbeddingDataset: start: {self.start}, stop: {self.stop}, len: {self.__len__()}>"
|
||||
|
||||
def set_start(self, start):
|
||||
"""
|
||||
Adjust the starting point within the reader, useful for resuming an epoch
|
||||
"""
|
||||
self.start = start
|
||||
|
||||
def get_start(self):
|
||||
return self.start
|
||||
|
||||
def get_sample(self):
|
||||
"""
|
||||
pre-proocess data from either reader into a common format
|
||||
|
||||
Reference in New Issue
Block a user