Skip to content

Commit 40a8351

Browse files
committed
Minor tweaks
1 parent c076c6b commit 40a8351

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/convnets/inception.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ backbone(m::Inceptionv3) = m.layers[1]
198198
classifier(m::Inceptionv3) = m.layers[2]
199199

200200
@deprecate Inception3 Inceptionv3
201+
@deprecate inception3 inceptionv3
201202

202203
## Inceptionv4
203204

@@ -408,15 +409,14 @@ function mixed_7a()
408409
return Parallel(cat_channels, branch1, branch2, branch3, branch4)
409410
end
410411

411-
function block8(scale = 1.0f0; no_relu = false)
412+
function block8(scale = 1.0f0; activation = identity)
412413
branch1 = Chain(conv_bn((1, 1), 2080, 192)...)
413414
branch2 = Chain(conv_bn((1, 1), 2080, 192)...,
414415
conv_bn((1, 3), 192, 224; pad = (0, 1))...,
415416
conv_bn((3, 1), 224, 256; pad = (1, 0))...)
416417
branch3 = Chain(conv_bn((1, 1), 448, 2080)...)
417-
activation = no_relu ? identity : relu
418418
return SkipConnection(Chain(Parallel(cat_channels, branch1, branch2),
419-
branch3, inputscale(scale; activation = activation)), +)
419+
branch3, inputscale(scale; activation)), +)
420420
end
421421

422422
"""
@@ -445,7 +445,7 @@ function inceptionresnetv2(; inchannels = 3, dropout = 0.0, nclasses = 1000)
445445
[block17(0.10f0) for _ in 1:20]...,
446446
mixed_7a(),
447447
[block8(0.20f0) for _ in 1:9]...,
448-
block8(; no_relu = true),
448+
block8(; activation = relu),
449449
conv_bn((1, 1), 2080, 1536)...)
450450
head = Chain(GlobalMeanPool(), MLUtils.flatten, Dropout(dropout), Dense(1536, nclasses))
451451
return Chain(body, head)

0 commit comments

Comments
 (0)