yunjey

fixed to be compatible with python 3

...@@ -93,7 +93,7 @@ class DTN(object): ...@@ -93,7 +93,7 @@ class DTN(object):
93 93
94 # spatial size for convolution 94 # spatial size for convolution
95 s = self.output_size 95 s = self.output_size
96 - s2, s4, s8, s16 = s/2, s/4, s/8, s/16 # 32, 16, 8, 4 96 + s2, s4, s8, s16 = int(s/2), int(s/4), int(s/8), int(s/16) # 32, 16, 8, 4
97 97
98 # project and reshape z 98 # project and reshape z
99 h1= linear(z, s16*s16*self.dim_gf*8, name='g_h1') # (batch_size, 2*2*512) 99 h1= linear(z, s16*s16*self.dim_gf*8, name='g_h1') # (batch_size, 2*2*512)
......
...@@ -51,7 +51,11 @@ class Solver(object): ...@@ -51,7 +51,11 @@ class Solver(object):
51 else: 51 else:
52 image_file = os.path.join(image_path, 'test.images.hkl') 52 image_file = os.path.join(image_path, 'test.images.hkl')
53 53
54 - images = hickle.load(image_file) 54 + try:
55 + images = hickle.load(image_file)
56 + except:
57 + hickle.load(images, image_file)
58 +
55 images = images / 127.5 - 1 59 images = images / 127.5 - 1
56 print ('finished loading mnist image dataset..!') 60 print ('finished loading mnist image dataset..!')
57 return images 61 return images
......