Skip to content

Commit 722c33a

Browse files
committed
add missing ReLU in transfer learning architecture
1 parent e010afd commit 722c33a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ensemble-transfer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,18 @@ def create_model(model_settings, model_parameters, io=sys.stdout):
204204
upperlegs = []
205205
for x in lowerlegs:
206206
if minshape1 != x.shape[1] or minshape2 != x.shape[2]:
207+
x = ReLU()(x)
207208
x = Conv2D(x.shape[3], (x.shape[1] - minshape1 + 1, x.shape[2] - minshape2 + 1))(x)
208209
hidden_layers.append(x)
209210
upperlegs.append(x)
210211
x = Concatenate()(upperlegs)
211212
else:
212213
x = lowerlegs[0]
213214

215+
x = ReLU()(x)
214216
for (t,f,m) in conv_layers:
215-
x = ReLU()(x)
216217
x = Conv2D(m, (t,f))(x)
218+
x = ReLU()(x)
217219
hidden_layers.append(x)
218220

219221
if dropout>0:

0 commit comments

Comments
 (0)