Skip to content

Commit

Permalink
replace inline latex syntax in hfdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent2916 authored and rwightman committed Nov 19, 2023
1 parent 21647c0 commit 23e7f17
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 72 deletions.
10 changes: 5 additions & 5 deletions hfdocs/source/models/efficientnet-pruned.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# EfficientNet (Knapsack Pruned)

**EfficientNet** is a convolutional neural network architecture and scaling method that uniformly scales all dimensions of depth/width/resolution using a *compound coefficient*. Unlike conventional practice that arbitrary scales these factors, the EfficientNet scaling method uniformly scales network width, depth, and resolution with a set of fixed scaling coefficients. For example, if we want to use $2^N$ times more computational resources, then we can simply increase the network depth by $\alpha ^ N$, width by $\beta ^ N$, and image size by $\gamma ^ N$, where $\alpha, \beta, \gamma$ are constant coefficients determined by a small grid search on the original small model. EfficientNet uses a compound coefficient $\phi$ to uniformly scales network width, depth, and resolution in a principled way.
**EfficientNet** is a convolutional neural network architecture and scaling method that uniformly scales all dimensions of depth/width/resolution using a *compound coefficient*. Unlike conventional practice that arbitrary scales these factors, the EfficientNet scaling method uniformly scales network width, depth, and resolution with a set of fixed scaling coefficients. For example, if we want to use \\( 2^N \\) times more computational resources, then we can simply increase the network depth by \\( \alpha ^ N \\), width by \\( \beta ^ N \\), and image size by \\( \gamma ^ N \\), where \\( \alpha, \beta, \gamma \\) are constant coefficients determined by a small grid search on the original small model. EfficientNet uses a compound coefficient \\( \phi \\) to uniformly scales network width, depth, and resolution in a principled way.

The compound scaling method is justified by the intuition that if the input image is bigger, then the network needs more layers to increase the receptive field and more channels to capture more fine-grained patterns on the bigger image.

Expand All @@ -20,7 +20,7 @@ To load a pretrained model:

To load and preprocess the image:

```py
```py
>>> import urllib
>>> from PIL import Image
>>> from timm.data import resolve_data_config
Expand Down Expand Up @@ -51,7 +51,7 @@ To get the top-5 predictions class names:
```py
>>> # Get imagenet class mappings
>>> url, filename = ("https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt", "imagenet_classes.txt")
>>> urllib.request.urlretrieve(url, filename)
>>> urllib.request.urlretrieve(url, filename)
>>> with open("imagenet_classes.txt", "r") as f:
... categories = [s.strip() for s in f.readlines()]

Expand Down Expand Up @@ -85,7 +85,7 @@ You can follow the [timm recipe scripts](../scripts) for training a new model af

```BibTeX
@misc{tan2020efficientnet,
title={EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks},
title={EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks},
author={Mingxing Tan and Quoc V. Le},
year={2020},
eprint={1905.11946},
Expand Down Expand Up @@ -209,4 +209,4 @@ Models:
Metrics:
Top 1 Accuracy: 80.86%
Top 5 Accuracy: 95.24%
-->
-->
10 changes: 5 additions & 5 deletions hfdocs/source/models/efficientnet.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# EfficientNet

**EfficientNet** is a convolutional neural network architecture and scaling method that uniformly scales all dimensions of depth/width/resolution using a *compound coefficient*. Unlike conventional practice that arbitrary scales these factors, the EfficientNet scaling method uniformly scales network width, depth, and resolution with a set of fixed scaling coefficients. For example, if we want to use $2^N$ times more computational resources, then we can simply increase the network depth by $\alpha ^ N$, width by $\beta ^ N$, and image size by $\gamma ^ N$, where $\alpha, \beta, \gamma$ are constant coefficients determined by a small grid search on the original small model. EfficientNet uses a compound coefficient $\phi$ to uniformly scales network width, depth, and resolution in a principled way.
**EfficientNet** is a convolutional neural network architecture and scaling method that uniformly scales all dimensions of depth/width/resolution using a *compound coefficient*. Unlike conventional practice that arbitrary scales these factors, the EfficientNet scaling method uniformly scales network width, depth, and resolution with a set of fixed scaling coefficients. For example, if we want to use \\( 2^N \\) times more computational resources, then we can simply increase the network depth by \\( \alpha ^ N \\), width by \\( \beta ^ N \\), and image size by \\( \gamma ^ N \\), where \\( \alpha, \beta, \gamma \\) are constant coefficients determined by a small grid search on the original small model. EfficientNet uses a compound coefficient \\( \phi \\) to uniformly scales network width, depth, and resolution in a principled way.

The compound scaling method is justified by the intuition that if the input image is bigger, then the network needs more layers to increase the receptive field and more channels to capture more fine-grained patterns on the bigger image.

Expand All @@ -18,7 +18,7 @@ To load a pretrained model:

To load and preprocess the image:

```py
```py
>>> import urllib
>>> from PIL import Image
>>> from timm.data import resolve_data_config
Expand Down Expand Up @@ -49,7 +49,7 @@ To get the top-5 predictions class names:
```py
>>> # Get imagenet class mappings
>>> url, filename = ("https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt", "imagenet_classes.txt")
>>> urllib.request.urlretrieve(url, filename)
>>> urllib.request.urlretrieve(url, filename)
>>> with open("imagenet_classes.txt", "r") as f:
... categories = [s.strip() for s in f.readlines()]

Expand Down Expand Up @@ -83,7 +83,7 @@ You can follow the [timm recipe scripts](../scripts) for training a new model af

```BibTeX
@misc{tan2020efficientnet,
title={EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks},
title={EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks},
author={Mingxing Tan and Quoc V. Le},
year={2020},
eprint={1905.11946},
Expand Down Expand Up @@ -389,4 +389,4 @@ Models:
Metrics:
Top 1 Accuracy: 75.5%
Top 5 Accuracy: 92.51%
-->
-->
8 changes: 4 additions & 4 deletions hfdocs/source/models/gloun-resnext.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# (Gluon) ResNeXt

A **ResNeXt** repeats a [building block](https://paperswithcode.com/method/resnext-block) that aggregates a set of transformations with the same topology. Compared to a [ResNet](https://paperswithcode.com/method/resnet), it exposes a new dimension, *cardinality* (the size of the set of transformations) $C$, as an essential factor in addition to the dimensions of depth and width.
A **ResNeXt** repeats a [building block](https://paperswithcode.com/method/resnext-block) that aggregates a set of transformations with the same topology. Compared to a [ResNet](https://paperswithcode.com/method/resnet), it exposes a new dimension, *cardinality* (the size of the set of transformations) \\( C \\), as an essential factor in addition to the dimensions of depth and width.

The weights from this model were ported from [Gluon](https://cv.gluon.ai/model_zoo/classification.html).

Expand All @@ -16,7 +16,7 @@ To load a pretrained model:

To load and preprocess the image:

```py
```py
>>> import urllib
>>> from PIL import Image
>>> from timm.data import resolve_data_config
Expand Down Expand Up @@ -47,7 +47,7 @@ To get the top-5 predictions class names:
```py
>>> # Get imagenet class mappings
>>> url, filename = ("https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt", "imagenet_classes.txt")
>>> urllib.request.urlretrieve(url, filename)
>>> urllib.request.urlretrieve(url, filename)
>>> with open("imagenet_classes.txt", "r") as f:
... categories = [s.strip() for s in f.readlines()]

Expand Down Expand Up @@ -206,4 +206,4 @@ Models:
Metrics:
Top 1 Accuracy: 79.35%
Top 5 Accuracy: 94.42%
-->
-->
10 changes: 5 additions & 5 deletions hfdocs/source/models/hrnet.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HRNet

**HRNet**, or **High-Resolution Net**, is a general purpose convolutional neural network for tasks like semantic segmentation, object detection and image classification. It is able to maintain high resolution representations through the whole process. We start from a high-resolution convolution stream, gradually add high-to-low resolution convolution streams one by one, and connect the multi-resolution streams in parallel. The resulting network consists of several ($4$ in the paper) stages and the $n$th stage contains $n$ streams corresponding to $n$ resolutions. The authors conduct repeated multi-resolution fusions by exchanging the information across the parallel streams over and over.
**HRNet**, or **High-Resolution Net**, is a general purpose convolutional neural network for tasks like semantic segmentation, object detection and image classification. It is able to maintain high resolution representations through the whole process. We start from a high-resolution convolution stream, gradually add high-to-low resolution convolution streams one by one, and connect the multi-resolution streams in parallel. The resulting network consists of several (\\( 4 \\) in the paper) stages and the \\( n \\)th stage contains \\( n \\) streams corresponding to \\( n \\) resolutions. The authors conduct repeated multi-resolution fusions by exchanging the information across the parallel streams over and over.

## How do I use this model on an image?

Expand All @@ -14,7 +14,7 @@ To load a pretrained model:

To load and preprocess the image:

```py
```py
>>> import urllib
>>> from PIL import Image
>>> from timm.data import resolve_data_config
Expand Down Expand Up @@ -45,7 +45,7 @@ To get the top-5 predictions class names:
```py
>>> # Get imagenet class mappings
>>> url, filename = ("https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt", "imagenet_classes.txt")
>>> urllib.request.urlretrieve(url, filename)
>>> urllib.request.urlretrieve(url, filename)
>>> with open("imagenet_classes.txt", "r") as f:
... categories = [s.strip() for s in f.readlines()]

Expand Down Expand Up @@ -79,7 +79,7 @@ You can follow the [timm recipe scripts](../scripts) for training a new model af

```BibTeX
@misc{sun2019highresolution,
title={High-Resolution Representations for Labeling Pixels and Regions},
title={High-Resolution Representations for Labeling Pixels and Regions},
author={Ke Sun and Yang Zhao and Borui Jiang and Tianheng Cheng and Bin Xiao and Dong Liu and Yadong Mu and Xinggang Wang and Wenyu Liu and Jingdong Wang},
year={2019},
eprint={1904.04514},
Expand Down Expand Up @@ -422,4 +422,4 @@ Models:
Metrics:
Top 1 Accuracy: 79.46%
Top 5 Accuracy: 94.65%
-->
-->
12 changes: 6 additions & 6 deletions hfdocs/source/models/ig-resnext.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Instagram ResNeXt WSL

A **ResNeXt** repeats a [building block](https://paperswithcode.com/method/resnext-block) that aggregates a set of transformations with the same topology. Compared to a [ResNet](https://paperswithcode.com/method/resnet), it exposes a new dimension, *cardinality* (the size of the set of transformations) $C$, as an essential factor in addition to the dimensions of depth and width.
A **ResNeXt** repeats a [building block](https://paperswithcode.com/method/resnext-block) that aggregates a set of transformations with the same topology. Compared to a [ResNet](https://paperswithcode.com/method/resnet), it exposes a new dimension, *cardinality* (the size of the set of transformations) \\( C \\), as an essential factor in addition to the dimensions of depth and width.

This model was trained on billions of Instagram images using thousands of distinct hashtags as labels exhibit excellent transfer learning performance.
This model was trained on billions of Instagram images using thousands of distinct hashtags as labels exhibit excellent transfer learning performance.

Please note the CC-BY-NC 4.0 license on theses weights, non-commercial use only.

Expand All @@ -18,7 +18,7 @@ To load a pretrained model:

To load and preprocess the image:

```py
```py
>>> import urllib
>>> from PIL import Image
>>> from timm.data import resolve_data_config
Expand Down Expand Up @@ -49,7 +49,7 @@ To get the top-5 predictions class names:
```py
>>> # Get imagenet class mappings
>>> url, filename = ("https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt", "imagenet_classes.txt")
>>> urllib.request.urlretrieve(url, filename)
>>> urllib.request.urlretrieve(url, filename)
>>> with open("imagenet_classes.txt", "r") as f:
... categories = [s.strip() for s in f.readlines()]

Expand Down Expand Up @@ -83,7 +83,7 @@ You can follow the [timm recipe scripts](../scripts) for training a new model af

```BibTeX
@misc{mahajan2018exploring,
title={Exploring the Limits of Weakly Supervised Pretraining},
title={Exploring the Limits of Weakly Supervised Pretraining},
author={Dhruv Mahajan and Ross Girshick and Vignesh Ramanathan and Kaiming He and Manohar Paluri and Yixuan Li and Ashwin Bharambe and Laurens van der Maaten},
year={2018},
eprint={1805.00932},
Expand Down Expand Up @@ -273,4 +273,4 @@ Models:
Metrics:
Top 1 Accuracy: 82.7%
Top 5 Accuracy: 96.64%
-->
-->
10 changes: 5 additions & 5 deletions hfdocs/source/models/nasnet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To load a pretrained model:

To load and preprocess the image:

```py
```py
>>> import urllib
>>> from PIL import Image
>>> from timm.data import resolve_data_config
Expand Down Expand Up @@ -45,7 +45,7 @@ To get the top-5 predictions class names:
```py
>>> # Get imagenet class mappings
>>> url, filename = ("https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt", "imagenet_classes.txt")
>>> urllib.request.urlretrieve(url, filename)
>>> urllib.request.urlretrieve(url, filename)
>>> with open("imagenet_classes.txt", "r") as f:
... categories = [s.strip() for s in f.readlines()]

Expand Down Expand Up @@ -79,7 +79,7 @@ You can follow the [timm recipe scripts](../scripts) for training a new model af

```BibTeX
@misc{zoph2018learning,
title={Learning Transferable Architectures for Scalable Image Recognition},
title={Learning Transferable Architectures for Scalable Image Recognition},
author={Barret Zoph and Vijay Vasudevan and Jonathon Shlens and Quoc V. Le},
year={2018},
eprint={1707.07012},
Expand Down Expand Up @@ -125,7 +125,7 @@ Models:
Image Size: '331'
Interpolation: bicubic
Label Smoothing: 0.1
RMSProp $\epsilon$: 1.0
RMSProp \\( \epsilon \\): 1.0
Code: https://github.com/rwightman/pytorch-image-models/blob/d8e69206be253892b2956341fea09fdebfaae4e3/timm/models/nasnet.py#L562
Weights: http://data.lip6.fr/cadene/pretrainedmodels/nasnetalarge-a1897284.pth
Results:
Expand All @@ -134,4 +134,4 @@ Models:
Metrics:
Top 1 Accuracy: 82.63%
Top 5 Accuracy: 96.05%
-->
-->
14 changes: 7 additions & 7 deletions hfdocs/source/models/regnetx.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# RegNetX

**RegNetX** is a convolutional network design space with simple, regular models with parameters: depth $d$, initial width $w\_{0} > 0$, and slope $w\_{a} > 0$, and generates a different block width $u\_{j}$ for each block $j < d$. The key restriction for the RegNet types of model is that there is a linear parameterisation of block widths (the design space only contains models with this linear structure):
**RegNetX** is a convolutional network design space with simple, regular models with parameters: depth \\( d \\), initial width \\( w\_{0} > 0 \\), and slope \\( w\_{a} > 0 \\), and generates a different block width \\( u\_{j} \\) for each block \\( j < d \\). The key restriction for the RegNet types of model is that there is a linear parameterisation of block widths (the design space only contains models with this linear structure):

$$ u\_{j} = w\_{0} + w\_{a}\cdot{j} $$
\\( \\) u\_{j} = w\_{0} + w\_{a}\cdot{j} \\( \\)

For **RegNetX** we have additional restrictions: we set $b = 1$ (the bottleneck ratio), $12 \leq d \leq 28$, and $w\_{m} \geq 2$ (the width multiplier).
For **RegNetX** we have additional restrictions: we set \\( b = 1 \\) (the bottleneck ratio), \\( 12 \leq d \leq 28 \\), and \\( w\_{m} \geq 2 \\) (the width multiplier).

## How do I use this model on an image?

Expand All @@ -18,7 +18,7 @@ To load a pretrained model:

To load and preprocess the image:

```py
```py
>>> import urllib
>>> from PIL import Image
>>> from timm.data import resolve_data_config
Expand Down Expand Up @@ -49,7 +49,7 @@ To get the top-5 predictions class names:
```py
>>> # Get imagenet class mappings
>>> url, filename = ("https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt", "imagenet_classes.txt")
>>> urllib.request.urlretrieve(url, filename)
>>> urllib.request.urlretrieve(url, filename)
>>> with open("imagenet_classes.txt", "r") as f:
... categories = [s.strip() for s in f.readlines()]

Expand Down Expand Up @@ -83,7 +83,7 @@ You can follow the [timm recipe scripts](../scripts) for training a new model af

```BibTeX
@misc{radosavovic2020designing,
title={Designing Network Design Spaces},
title={Designing Network Design Spaces},
author={Ilija Radosavovic and Raj Prateek Kosaraju and Ross Girshick and Kaiming He and Piotr Dollár},
year={2020},
eprint={2003.13678},
Expand Down Expand Up @@ -556,4 +556,4 @@ Models:
Metrics:
Top 1 Accuracy: 80.25%
Top 5 Accuracy: 95.03%
-->
-->
14 changes: 7 additions & 7 deletions hfdocs/source/models/regnety.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# RegNetY

**RegNetY** is a convolutional network design space with simple, regular models with parameters: depth $d$, initial width $w\_{0} > 0$, and slope $w\_{a} > 0$, and generates a different block width $u\_{j}$ for each block $j < d$. The key restriction for the RegNet types of model is that there is a linear parameterisation of block widths (the design space only contains models with this linear structure):
**RegNetY** is a convolutional network design space with simple, regular models with parameters: depth \\( d \\), initial width \\( w\_{0} > 0 \\), and slope \\( w\_{a} > 0 \\), and generates a different block width \\( u\_{j} \\) for each block \\( j < d \\). The key restriction for the RegNet types of model is that there is a linear parameterisation of block widths (the design space only contains models with this linear structure):

$$ u\_{j} = w\_{0} + w\_{a}\cdot{j} $$
\\( \\) u\_{j} = w\_{0} + w\_{a}\cdot{j} \\( \\)

For **RegNetX** authors have additional restrictions: we set $b = 1$ (the bottleneck ratio), $12 \leq d \leq 28$, and $w\_{m} \geq 2$ (the width multiplier).
For **RegNetX** authors have additional restrictions: we set \\( b = 1 \\) (the bottleneck ratio), \\( 12 \leq d \leq 28 \\), and \\( w\_{m} \geq 2 \\) (the width multiplier).

For **RegNetY** authors make one change, which is to include [Squeeze-and-Excitation blocks](https://paperswithcode.com/method/squeeze-and-excitation-block).

Expand All @@ -20,7 +20,7 @@ To load a pretrained model:

To load and preprocess the image:

```py
```py
>>> import urllib
>>> from PIL import Image
>>> from timm.data import resolve_data_config
Expand Down Expand Up @@ -51,7 +51,7 @@ To get the top-5 predictions class names:
```py
>>> # Get imagenet class mappings
>>> url, filename = ("https://raw.githubusercontent.com/pytorch/hub/master/imagenet_classes.txt", "imagenet_classes.txt")
>>> urllib.request.urlretrieve(url, filename)
>>> urllib.request.urlretrieve(url, filename)
>>> with open("imagenet_classes.txt", "r") as f:
... categories = [s.strip() for s in f.readlines()]

Expand Down Expand Up @@ -85,7 +85,7 @@ You can follow the [timm recipe scripts](../scripts) for training a new model af

```BibTeX
@misc{radosavovic2020designing,
title={Designing Network Design Spaces},
title={Designing Network Design Spaces},
author={Ilija Radosavovic and Raj Prateek Kosaraju and Ross Girshick and Kaiming He and Piotr Dollár},
year={2020},
eprint={2003.13678},
Expand Down Expand Up @@ -570,4 +570,4 @@ Models:
Metrics:
Top 1 Accuracy: 80.8%
Top 5 Accuracy: 95.25%
-->
-->
Loading

0 comments on commit 23e7f17

Please sign in to comment.