Commit 4d19f3b7 authored by Melan's avatar Melan

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

parent 368f4cc4
......@@ -81,7 +81,8 @@ class PersonalizedBase(Dataset):
entry.cond = cond_model([entry.cond_text]).to(devices.cpu)
self.dataset.append(entry)
assert len(self.dataset) > 1, "No images have been found in the dataset."
self.length = len(self.dataset) * repeats
self.initial_indexes = np.arange(self.length) % len(self.dataset)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment