Skip to content

Commit 2b1fbd1

Browse files
authored
Merge pull request #189 from cluffa/master
Removed extra mobilenetv1 fc layer, fcsize param
2 parents 48d1401 + 0926991 commit 2b1fbd1

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Metalhead"
22
uuid = "dbeba491-748d-5e0e-a39e-b530a07fa0cc"
3-
version = "0.7.3"
3+
version = "0.8.0-DEV"
44

55
[deps]
66
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

src/convnets/mobilenet.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
mobilenetv1(width_mult, config;
55
activation = relu,
66
inchannels = 3,
7-
fcsize = 1024,
87
nclasses = 1000)
98
109
Create a MobileNetv1 model ([reference](https://arxiv.org/abs/1704.04861v1)).
@@ -22,13 +21,11 @@ Create a MobileNetv1 model ([reference](https://arxiv.org/abs/1704.04861v1)).
2221
+ `r`: The number of time this configuration block is repeated
2322
- `activate`: The activation function to use throughout the network
2423
- `inchannels`: The number of input channels. The default value is 3.
25-
- `fcsize`: The intermediate fully-connected size between the convolution and final layers
2624
- `nclasses`: The number of output classes
2725
"""
2826
function mobilenetv1(width_mult, config;
2927
activation = relu,
3028
inchannels = 3,
31-
fcsize = 1024,
3229
nclasses = 1000)
3330
layers = []
3431
for (dw, outch, stride, nrepeats) in config
@@ -47,8 +44,7 @@ function mobilenetv1(width_mult, config;
4744
return Chain(Chain(layers),
4845
Chain(GlobalMeanPool(),
4946
MLUtils.flatten,
50-
Dense(inchannels, fcsize, activation),
51-
Dense(fcsize, nclasses)))
47+
Dense(inchannels, nclasses)))
5248
end
5349

5450
const mobilenetv1_configs = [

0 commit comments

Comments
 (0)