Raise an assertion error if no training images have been found.

This commit is contained in:
Melan 2022-10-14 22:45:26 +02:00
parent 368f4cc4c7
commit 4d19f3b7d4
1 changed files with 2 additions and 1 deletions

View File

@ -82,6 +82,7 @@ class PersonalizedBase(Dataset):
self.dataset.append(entry) self.dataset.append(entry)
assert len(self.dataset) > 1, "No images have been found in the dataset."
self.length = len(self.dataset) * repeats self.length = len(self.dataset) * repeats
self.initial_indexes = np.arange(self.length) % len(self.dataset) self.initial_indexes = np.arange(self.length) % len(self.dataset)