Skip to content

Commit 19a18bf

Browse files
committed
Splat conv_bn
1 parent 7e2e1e4 commit 19a18bf

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/convnets/efficientnet.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,13 @@ function efficientnet(scalings, block_config;
4545
blocks = Chain(blocks...)
4646

4747
head_out_channels = _round_channels(max_width, 8)
48-
head = Chain(Conv((1, 1), out_channels => head_out_channels;
49-
bias = false, pad = SamePad()),
50-
BatchNorm(head_out_channels, swish))
48+
head = conv_bn((1, 1), out_channels, head_out_channels, swish;
49+
bias = false, pad = SamePad())
5150

5251
top = Dense(head_out_channels, nclasses)
5352

54-
return Chain(Chain(stem, blocks, head),
55-
Chain(AdaptiveMeanPool((1, 1)), MLUtils.flatten, top))
53+
return Chain(Chain(stem..., blocks, head...),
54+
Chain(AdaptiveMeanPool((1, 1)), MLUtils.flatten, top))
5655
end
5756

5857
# n: # of block repetitions

0 commit comments

Comments
 (0)