@@ -198,6 +198,7 @@ backbone(m::Inceptionv3) = m.layers[1]
198
198
classifier (m:: Inceptionv3 ) = m. layers[2 ]
199
199
200
200
@deprecate Inception3 Inceptionv3
201
+ @deprecate inception3 inceptionv3
201
202
202
203
# # Inceptionv4
203
204
@@ -408,15 +409,14 @@ function mixed_7a()
408
409
return Parallel (cat_channels, branch1, branch2, branch3, branch4)
409
410
end
410
411
411
- function block8 (scale = 1.0f0 ; no_relu = false )
412
+ function block8 (scale = 1.0f0 ; activation = identity )
412
413
branch1 = Chain (conv_bn ((1 , 1 ), 2080 , 192 )... )
413
414
branch2 = Chain (conv_bn ((1 , 1 ), 2080 , 192 )... ,
414
415
conv_bn ((1 , 3 ), 192 , 224 ; pad = (0 , 1 ))... ,
415
416
conv_bn ((3 , 1 ), 224 , 256 ; pad = (1 , 0 ))... )
416
417
branch3 = Chain (conv_bn ((1 , 1 ), 448 , 2080 )... )
417
- activation = no_relu ? identity : relu
418
418
return SkipConnection (Chain (Parallel (cat_channels, branch1, branch2),
419
- branch3, inputscale (scale; activation = activation )), + )
419
+ branch3, inputscale (scale; activation)), + )
420
420
end
421
421
422
422
"""
@@ -445,7 +445,7 @@ function inceptionresnetv2(; inchannels = 3, dropout = 0.0, nclasses = 1000)
445
445
[block17 (0.10f0 ) for _ in 1 : 20 ]. .. ,
446
446
mixed_7a (),
447
447
[block8 (0.20f0 ) for _ in 1 : 9 ]. .. ,
448
- block8 (; no_relu = true ),
448
+ block8 (; activation = relu ),
449
449
conv_bn ((1 , 1 ), 2080 , 1536 )... )
450
450
head = Chain (GlobalMeanPool (), MLUtils. flatten, Dropout (dropout), Dense (1536 , nclasses))
451
451
return Chain (body, head)
0 commit comments