Merge pull request #2661 from Melanpan/master

Raise an assertion error if no training images have been found.
This commit is contained in:
AUTOMATIC1111 2022-10-15 10:13:23 +03:00 committed by GitHub
commit 5207cba56f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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