Skip to content

Commit

Permalink
Docstrings can't be duplicated yet
Browse files Browse the repository at this point in the history
Signed-off-by: Abhirath Anand <[email protected]>
  • Loading branch information
theabhirath committed Jun 5, 2023
1 parent d8cbdd1 commit 436c958
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions docs/src/howto/resnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ To check out more about using pretrained models, check out the [pretrained model

## The mid-level function

Metalhead also provides a function for users looking to customise the ResNet family of models further. This function is named [`Metalhead.resnet`](@ref) and has a detailed docstring that describes all the various customisation options.
Metalhead also provides a function for users looking to customise the ResNet family of models further. This function is named [`Metalhead.resnet`](@ref) and has a detailed docstring that describes all the various customisation options. You may want to open the above link in another tab, because we're going to be referring to it extensively to build a ResNet model of our liking.

```@docs
Metalhead.resnet
```

But how do we use this to build a ResNet-like model of our liking? First, let's take a peek at how we would write the vanilla ResNet-18 model using this function. We know from the docstring that we want to use `Metalhead.basicblock` for the block, since the paper uses bottleneck blocks for depths 50 and above. We also know that the number of block repeats in each stage of the model as per the paper - 2 for each. For all other options, the default values work well. So we can write the ResNet-18 model as follows:
First, let's take a peek at how we would write the vanilla ResNet-18 model using this function. We know from the docstring that we want to use `Metalhead.basicblock` for the block, since the paper uses bottleneck blocks for depths 50 and above. We also know that the number of block repeats in each stage of the model as per the paper - 2 for each. For all other options, the default values work well. So we can write the ResNet-18 model as follows:

```julia
resnet18 = Metalhead.resnet(Metalhead.basicblock, [2, 2, 2, 2])
Expand Down

0 comments on commit 436c958

Please sign in to comment.