Skip to content

Commit 052d311

Browse files
authored
Merge pull request #272 from adrhill/ah/fix-vgg-dropout
Fix VGG dropout probability
2 parents eed0c64 + 01bb4ad commit 052d311

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
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.9.2"
3+
version = "0.9.3"
44

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

src/convnets/vgg.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Create a VGG style model with specified `depth`.
109109
([reference](https://arxiv.org/abs/1409.1556v6)).
110110
111111
!!! warning
112-
112+
113113
`VGG` does not currently support pretrained weights for the `batchnorm = true` option.
114114
115115
# Arguments
@@ -130,7 +130,8 @@ end
130130
function VGG(depth::Integer; pretrain::Bool = false, batchnorm::Bool = false,
131131
inchannels::Integer = 3, nclasses::Integer = 1000)
132132
_checkconfig(depth, keys(VGG_CONFIGS))
133-
layers = vgg((224, 224); config = VGG_CONFIGS[depth], batchnorm, inchannels, nclasses)
133+
layers = vgg((224, 224); config = VGG_CONFIGS[depth], batchnorm, inchannels, nclasses,
134+
dropout_prob = 0.5)
134135
model = VGG(layers)
135136
if pretrain
136137
artifact_name = string("vgg", depth)

0 commit comments

Comments
 (0)