Skip to content

Commit 1fdb04b

Browse files
committed
fix error of c_dim
1 parent 7e97809 commit 1fdb04b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def __init__(self, sess, input_height=108, input_width=108, is_crop=True,
3434
"""
3535
self.sess = sess
3636
self.is_crop = is_crop
37-
self.is_grayscale = (c_dim == 1)
3837

3938
self.batch_size = batch_size
4039
self.sample_num = sample_num
@@ -76,9 +75,11 @@ def __init__(self, sess, input_height=108, input_width=108, is_crop=True,
7675
self.data_X, self.data_y = self.load_mnist()
7776
self.c_dim = self.data_X[0].shape[-1]
7877
else:
79-
self.data = glob(os.path.join("./data", config.dataset, self.input_fname_pattern))
78+
self.data = glob(os.path.join("./data", self.dataset_name, self.input_fname_pattern))
8079
self.c_dim = self.data[0].shape[-1]
8180

81+
self.is_grayscale = (self.c_dim == 1)
82+
8283
self.build_model()
8384

8485
def build_model(self):

0 commit comments

Comments
 (0)