Skip to content

Commit 1b09bf8

Browse files
committed
Raise err if dataset size less than batch_size
1 parent 3041fa3 commit 1b09bf8

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
@@ -85,6 +85,9 @@ def __init__(self, sess, input_height=108, input_width=108, crop=True,
8585

8686
self.grayscale = (self.c_dim == 1)
8787

88+
if len(self.data) < self.batch_size:
89+
raise Exception("[!] Entire dataset size is less than the configured batch_size")
90+
8891
self.build_model()
8992

9093
def build_model(self):

0 commit comments

Comments
 (0)