@@ -150,13 +150,11 @@ def entry_flow(self, data):
150
150
chns = self .bottleneck_params ["entry_flow" ][2 ]
151
151
strides = check_data (strides , block_num )
152
152
chns = check_data (chns , block_num )
153
- #print("entry:", block_num, strides, chns)
154
153
155
154
# params to control your flow
156
155
s = self .stride
157
156
block_point = self .block_point
158
157
output_stride = self .output_stride
159
- #print("entry:", s, block_point, output_stride)
160
158
with scope ("entry_flow" ):
161
159
for i in range (block_num ):
162
160
block_point = block_point + 1
@@ -167,13 +165,10 @@ def entry_flow(self, data):
167
165
data , chns [i ], [1 , 1 , stride ])
168
166
s = s * stride
169
167
if check_points (block_point , self .decode_points ):
170
- #print("decode shortcut:", block_point)
171
168
self .short_cuts [block_point ] = short_cuts [1 ]
172
- #print("entry:", i, data.shape)
173
169
174
170
self .stride = s
175
171
self .block_point = block_point
176
- #print("entry:", s, block_point, output_stride)
177
172
return data
178
173
179
174
def middle_flow (self , data ):
@@ -183,12 +178,10 @@ def middle_flow(self, data):
183
178
strides = check_data (strides , block_num )
184
179
chns = check_data (chns , block_num )
185
180
186
- #print("middle:", block_num, strides, chns)
187
181
# params to control your flow
188
182
s = self .stride
189
183
block_point = self .block_point
190
184
output_stride = self .output_stride
191
- #print("middle:", s, block_point, output_stride)
192
185
with scope ("middle_flow" ):
193
186
for i in range (block_num ):
194
187
block_point = block_point + 1
@@ -199,13 +192,10 @@ def middle_flow(self, data):
199
192
data , chns [i ], [1 , 1 , strides [i ]], skip_conv = False )
200
193
s = s * stride
201
194
if check_points (block_point , self .decode_points ):
202
- #print("decode shortcut:", block_point)
203
195
self .short_cuts [block_point ] = short_cuts [1 ]
204
- #print("middle:", i, data.shape)
205
196
206
197
self .stride = s
207
198
self .block_point = block_point
208
- #print("middle:", s, block_point, output_stride)
209
199
return data
210
200
211
201
def exit_flow (self , data ):
@@ -214,14 +204,12 @@ def exit_flow(self, data):
214
204
chns = self .bottleneck_params ["exit_flow" ][2 ]
215
205
strides = check_data (strides , block_num )
216
206
chns = check_data (chns , block_num )
217
- #print("exit:", block_num, strides, chns)
218
207
219
208
assert (block_num == 2 )
220
209
# params to control your flow
221
210
s = self .stride
222
211
block_point = self .block_point
223
212
output_stride = self .output_stride
224
- #print("exit:", s, block_point, output_stride)
225
213
with scope ("exit_flow" ):
226
214
with scope ('block1' ):
227
215
block_point += 1
@@ -231,9 +219,7 @@ def exit_flow(self, data):
231
219
[1 , 1 , stride ])
232
220
s = s * stride
233
221
if check_points (block_point , self .decode_points ):
234
- #print("decode shortcut:", block_point)
235
222
self .short_cuts [block_point ] = short_cuts [1 ]
236
- #print("exit:", 0, data.shape)
237
223
with scope ('block2' ):
238
224
block_point += 1
239
225
stride = strides [1 ] if check_stride (s * strides [1 ],
@@ -246,13 +232,10 @@ def exit_flow(self, data):
246
232
activation_fn_in_separable_conv = True )
247
233
s = s * stride
248
234
if check_points (block_point , self .decode_points ):
249
- #print("decode shortcut:", block_point)
250
235
self .short_cuts [block_point ] = short_cuts [1 ]
251
- #print("exit:", 1, data.shape)
252
236
253
237
self .stride = s
254
238
self .block_point = block_point
255
- #print("exit:", s, block_point, output_stride)
256
239
return data
257
240
258
241
def xception_block (self ,
@@ -332,4 +315,3 @@ def xception_71():
332
315
image = fluid .layers .data (name = 'image' , shape = image_shape , dtype = 'float32' )
333
316
model = xception_65 ()
334
317
logit = model .net (image )
335
- #print("logit:", logit.shape)
0 commit comments