Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix VGG dropout probability #272

Merged
merged 4 commits into from
Jan 18, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/convnets/vgg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Create a VGG style model with specified `depth`.
([reference](https://arxiv.org/abs/1409.1556v6)).

!!! warning

`VGG` does not currently support pretrained weights for the `batchnorm = true` option.

# Arguments
Expand All @@ -130,7 +130,8 @@ end
function VGG(depth::Integer; pretrain::Bool = false, batchnorm::Bool = false,
inchannels::Integer = 3, nclasses::Integer = 1000)
_checkconfig(depth, keys(VGG_CONFIGS))
layers = vgg((224, 224); config = VGG_CONFIGS[depth], batchnorm, inchannels, nclasses)
layers = vgg((224, 224); config = VGG_CONFIGS[depth], batchnorm, inchannels, nclasses,
dropout_prob = 0.5)
model = VGG(layers)
if pretrain
artifact_name = string("vgg", depth)
Expand Down
Loading