Skip to content

Commit

Permalink
Add tests and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
darsnack committed Jun 19, 2022
1 parent e0403ae commit d54f74b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
| [MobileNetv1](https://arxiv.org/abs/1704.04861) | [`MobileNetv1`](https://fluxml.ai/Metalhead.jl/dev/docstrings/Metalhead.MobileNetv1.html) | N |
| [MobileNetv2](https://arxiv.org/abs/1801.04381) | [`MobileNetv2`](https://fluxml.ai/Metalhead.jl/dev/docstrings/Metalhead.MobileNetv2.html) | N |
| [MobileNetv3](https://arxiv.org/abs/1905.02244) | [`MobileNetv3`](https://fluxml.ai/Metalhead.jl/dev/docstrings/Metalhead.MobileNetv3.html) | N |
| [EfficientNet](https://arxiv.org/abs/1905.11946) | [`EfficientNet`](https://fluxml.ai/Metalhead.jl/dev/docstrings/Metalhead.EfficientNet.html) | N |
| [MLPMixer](https://arxiv.org/pdf/2105.01601) | [`MLPMixer`](https://fluxml.ai/Metalhead.jl/dev/docstrings/Metalhead.MLPMixer.html) | N |
| [ResMLP](https://arxiv.org/abs/2105.03404) | [`ResMLP`](https://fluxml.ai/Metalhead.jl/dev/docstrings/Metalhead.ResMLP.html) | N |
| [gMLP](https://arxiv.org/abs/2105.08050) | [`gMLP`](https://fluxml.ai/Metalhead.jl/dev/docstrings/Metalhead.gMLP.html) | N |
Expand Down
18 changes: 18 additions & 0 deletions test/convnets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ end
GC.safepoint()
GC.gc()

@testset "EfficientNet" begin
@testset "EfficientNet($name)" for name in [:b0, :b1, :b2, :b3, :b4, :b5, :b6, :b7, :b8]
m = EfficientNet(name)
@test size(m(x_256)) == (1000, 1)
if (EfficientNet, name) in PRETRAINED_MODELS
@test (EfficientNet(name, pretrain = true); true)
else
@test_throws ArgumentError EfficientNet(name, pretrain = true)
end
@test gradtest(m, x_256)
GC.safepoint()
GC.gc()
end
end

GC.safepoint()
GC.gc()

@testset "GoogLeNet" begin
m = GoogLeNet()
@test size(m(x_224)) == (1000, 1)
Expand Down

0 comments on commit d54f74b

Please sign in to comment.