Skip to content

Commit 23cca48

Browse files
committed
Use @autodocs and fix references
1 parent ef4ccec commit 23cca48

File tree

10 files changed

+43
-36
lines changed

10 files changed

+43
-36
lines changed

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ makedocs(modules = [Metalhead, Artifacts, LazyArtifacts, Images, OneHotArrays, D
1111
],
1212
"Developer guide" => "contributing.md",
1313
"API reference" => [
14-
"api/models.md",
14+
"api/reference.md",
1515
],
1616
],
1717
format = Documenter.HTML(

docs/src/api/models.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/src/api/reference.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# API Reference
2+
3+
The API reference of `Metalhead.jl`.
4+
5+
**Note**:
6+
7+
```@autodocs
8+
Modules = [Metalhead]
9+
```
10+
11+
```@docs
12+
Metalhead.squeeze_excite
13+
Metalhead.LayerScale
14+
```

docs/src/tutorials/quickstart.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ using Flux, Metalhead
55
```
66

77
Using a model from Metalhead is as simple as selecting a model from the table of [available models](@ref). For example, below we use the pre-trained ResNet-18 model.
8-
{cell=quickstart}
98
```julia
109
using Flux, Metalhead
1110

src/convnets/alexnet.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Create a `AlexNet`.
4545
4646
`AlexNet` does not currently support pretrained weights.
4747
48-
See also [`Metalhead.alexnet`](@ref).
48+
See also [`alexnet`](@ref).
4949
"""
5050
struct AlexNet
5151
layers::Any

src/convnets/convnext.jl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Creates a single block of ConvNeXt.
77
# Arguments
88
99
- `planes`: number of input channels.
10-
- `stochastic_depth_prob`: Stochastic depth probability.
11-
- `layerscale_init`: Initial value for [`LayerScale`](@ref)
10+
- `drop_path_rate`: Stochastic depth rate.
11+
- `layerscale_init`: Initial value for [`Metalhead.LayerScale`](@ref)
1212
"""
1313
function convnextblock(planes::Integer, stochastic_depth_prob = 0.0,
1414
layerscale_init = 1.0f-6)
@@ -33,8 +33,13 @@ Creates the layers for a ConvNeXt model.
3333
3434
- `depths`: list with configuration for depth of each block
3535
- `planes`: list with configuration for number of output channels in each block
36+
<<<<<<< HEAD
3637
- `stochastic_depth_prob`: Stochastic depth probability.
3738
- `layerscale_init`: Initial value for [`LayerScale`](@ref)
39+
=======
40+
- `drop_path_rate`: Stochastic depth rate.
41+
- `layerscale_init`: Initial value for [`Metalhead.LayerScale`](@ref)
42+
>>>>>>> 5ac81ce (Use `@autodocs` and fix references)
3843
([reference](https://arxiv.org/abs/2103.17239))
3944
- `inchannels`: number of input channels.
4045
- `nclasses`: number of output classes
@@ -96,10 +101,13 @@ Creates a ConvNeXt model.
96101
- `inchannels`: number of input channels
97102
- `nclasses`: number of output classes
98103
104+
<<<<<<< HEAD
99105
!!! warning
100106
101107
`ConvNeXt` does not currently support pretrained weights.
102108
109+
=======
110+
>>>>>>> 5ac81ce (Use `@autodocs` and fix references)
103111
See also [`Metalhead.convnext`](@ref).
104112
"""
105113
struct ConvNeXt

src/convnets/resnets/core.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ used to build the block for the model, see [`Metalhead.bottleneck_builder`](@ref
6666
- `revnorm`: set to `true` to place the normalisation layer before the convolution
6767
- `drop_block`: the drop block layer
6868
- `drop_path`: the drop path layer
69+
<<<<<<< HEAD
6970
- `attn_fn`: the attention function to use. See [`squeeze_excite`](@ref) for an example.
71+
=======
72+
- `attn_fn`: the attention function to use. See [`Metalhead.squeeze_excite`](@ref) for an example.
73+
>>>>>>> 5ac81ce (Use `@autodocs` and fix references)
7074
"""
7175
function bottleneck(inplanes::Integer, planes::Integer; stride::Integer,
7276
cardinality::Integer = 1, base_width::Integer = 64,
@@ -231,7 +235,11 @@ const RESNET_SHORTCUTS = Dict(:A => (downsample_identity, downsample_identity),
231235
resnet_stem(; stem_type = :default, inchannels::Integer = 3, replace_stem_pool = false,
232236
norm_layer = BatchNorm, activation = relu)
233237
238+
<<<<<<< HEAD
234239
Builds a stem to be used in a ResNet model. See the `stem` argument of [`resnet`](@ref) for details
240+
=======
241+
Builds a stem to be used in a ResNet model. See the `stem` argument of [`Metalhead.resnet`](@ref) for details
242+
>>>>>>> 5ac81ce (Use `@autodocs` and fix references)
235243
on how to use this function.
236244
237245
# Arguments

src/convnets/resnets/resnet.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ The number of channels in outer 1x1 convolutions is the same.
4848
- `inchannels`: The number of input channels.
4949
- `nclasses`: The number of output classes
5050
51+
<<<<<<< HEAD
5152
Advanced users who want more configuration options will be better served by using [`resnet`](@ref).
53+
=======
54+
Advanced users who want more configuration options will be better served by using [`Metalhead.resnet`](@ref).
55+
>>>>>>> 5ac81ce (Use `@autodocs` and fix references)
5256
"""
5357
struct WideResNet
5458
layers::Any

src/convnets/resnets/seresnet.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ Creates a SEResNeXt model with the specified depth, cardinality, and base width.
5858
5959
`SEResNeXt` does not currently support pretrained weights.
6060
61+
<<<<<<< HEAD
6162
Advanced users who want more configuration options will be better served by using [`resnet`](@ref).
63+
=======
64+
Advanced users who want more configuration options will be better served by using [`Metalhead.resnet`](@ref).
65+
>>>>>>> 5ac81ce (Use `@autodocs` and fix references)
6266
"""
6367
struct SEResNeXt
6468
layers::Any

src/convnets/squeezenet.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Create a SqueezeNet
6363
- `inchannels`: number of input channels.
6464
- `nclasses`: the number of output classes.
6565
66-
See also [`Metalhead.squeezenet`](@ref).
66+
See also [`squeezenet`](@ref).
6767
"""
6868
struct SqueezeNet
6969
layers::Any

0 commit comments

Comments
 (0)