Skip to content

Commit f070232

Browse files
authored
Merge pull request #295 from spacemunkay/error-data-batch-size
Raise error if dataset size less than batch_size
2 parents a1a7a57 + 1b09bf8 commit f070232

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ def __init__(self, sess, input_height=108, input_width=108, crop=True,
8888

8989
self.grayscale = (self.c_dim == 1)
9090

91+
if len(self.data) < self.batch_size:
92+
raise Exception("[!] Entire dataset size is less than the configured batch_size")
93+
9194
self.build_model()
9295

9396
def build_model(self):

0 commit comments

Comments
 (0)