Skip to content

Commit

Permalink
Merge pull request #265 from darsnack/mobilenet-constructor-fix
Browse files Browse the repository at this point in the history
Fix bug where MobileNetv2/3 return a MobileNetv1
  • Loading branch information
darsnack authored Dec 22, 2023
2 parents 268da20 + 3665a11 commit 3bd48ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Metalhead"
uuid = "dbeba491-748d-5e0e-a39e-b530a07fa0cc"
version = "0.9.0"
version = "0.9.1"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand Down
2 changes: 1 addition & 1 deletion src/convnets/mobilenets/mobilenetv2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ end
function MobileNetv2(width_mult::Real = 1; pretrain::Bool = false,
inchannels::Integer = 3, nclasses::Integer = 1000)
layers = mobilenetv2(width_mult; inchannels, nclasses)
model = MobileNetv1(layers)
model = MobileNetv2(layers)
if pretrain
loadpretrain!(model, "mobilenet_v2")
end
Expand Down
2 changes: 1 addition & 1 deletion src/convnets/mobilenets/mobilenetv3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ end
function MobileNetv3(config::Symbol; width_mult::Real = 1, pretrain::Bool = false,
inchannels::Integer = 3, nclasses::Integer = 1000)
layers = mobilenetv3(config; width_mult, inchannels, nclasses)
model = MobileNetv1(layers)
model = MobileNetv3(layers)
if pretrain
loadpretrain!(model, "mobilenet_v3")
end
Expand Down

0 comments on commit 3bd48ad

Please sign in to comment.