Skip to content

Commit 85edbcd

Browse files
authored
Merge pull request #303 from pengwa/fix
move self.data length check to the right place
2 parents 351a654 + 529950a commit 85edbcd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ def __init__(self, sess, input_height=108, input_width=108, crop=True,
8686
else:
8787
self.c_dim = 1
8888

89+
if len(self.data) < self.batch_size:
90+
raise Exception("[!] Entire dataset size is less than the configured batch_size")
91+
8992
self.grayscale = (self.c_dim == 1)
9093

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

9696
def build_model(self):

0 commit comments

Comments
 (0)