regnet.md 4.24 KB
Newer Older
Francesco Saverio Zuppichini's avatar
Francesco Saverio Zuppichini committed
1
2
3
4
5
6
7
8
9
10
<!--Copyright 2022 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
11
12
13
14

鈿狅笍 Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.

Francesco Saverio Zuppichini's avatar
Francesco Saverio Zuppichini committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-->

# RegNet

## Overview

The RegNet model was proposed in [Designing Network Design Spaces](https://arxiv.org/abs/2003.13678) by Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, Piotr Doll谩r.

The authors design search spaces to perform Neural Architecture Search (NAS). They first start from a high dimensional search space and iteratively reduce the search space by empirically applying constraints based on the best-performing models sampled by the current search space.

The abstract from the paper is the following:

*In this work, we present a new network design paradigm. Our goal is to help advance the understanding of network design and discover design principles that generalize across settings. Instead of focusing on designing individual network instances, we design network design spaces that parametrize populations of networks. The overall process is analogous to classic manual design of networks, but elevated to the design space level. Using our methodology we explore the structure aspect of network design and arrive at a low-dimensional design space consisting of simple, regular networks that we call RegNet. The core insight of the RegNet parametrization is surprisingly simple: widths and depths of good networks can be explained by a quantized linear function. We analyze the RegNet design space and arrive at interesting findings that do not match the current practice of network design. The RegNet design space provides simple and fast networks that work well across a wide range of flop regimes. Under comparable training settings and flops, the RegNet models outperform the popular EfficientNet models while being up to 5x faster on GPUs.*

29
This model was contributed by [Francesco](https://huggingface.co/Francesco). The TensorFlow version of the model
30
was contributed by [sayakpaul](https://huggingface.co/sayakpaul) and [ariG23498](https://huggingface.co/ariG23498).
Francesco Saverio Zuppichini's avatar
Francesco Saverio Zuppichini committed
31
32
The original code can be found [here](https://github.com/facebookresearch/pycls).

33
34
35
The huge 10B model from [Self-supervised Pretraining of Visual Features in the Wild](https://arxiv.org/abs/2103.01988), 
trained on  one billion Instagram images, is available on the [hub](https://huggingface.co/facebook/regnet-y-10b-seer)

NielsRogge's avatar
NielsRogge committed
36
37
38
39
40
41
42
## Resources

A list of official Hugging Face and community (indicated by 馃寧) resources to help you get started with RegNet.

<PipelineTag pipeline="image-classification"/>

- [`RegNetForImageClassification`] is supported by this [example script](https://github.com/huggingface/transformers/tree/main/examples/pytorch/image-classification) and [notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/image_classification.ipynb).
43
- See also: [Image classification task guide](../tasks/image_classification)
NielsRogge's avatar
NielsRogge committed
44
45

If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we'll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.
Francesco Saverio Zuppichini's avatar
Francesco Saverio Zuppichini committed
46
47
48
49
50

## RegNetConfig

[[autodoc]] RegNetConfig

51
52
<frameworkcontent>
<pt>
Francesco Saverio Zuppichini's avatar
Francesco Saverio Zuppichini committed
53
54
55
56
57
58
59
60
61

## RegNetModel

[[autodoc]] RegNetModel
    - forward

## RegNetForImageClassification

[[autodoc]] RegNetForImageClassification
62
63
    - forward

64
65
66
</pt>
<tf>

67
68
69
70
71
72
73
74
## TFRegNetModel

[[autodoc]] TFRegNetModel
    - call

## TFRegNetForImageClassification

[[autodoc]] TFRegNetForImageClassification
Shubhamai's avatar
Shubhamai committed
75
76
    - call

77
78
</tf>
<jax>
Shubhamai's avatar
Shubhamai committed
79
80
81
82
83
84
85
86
87

## FlaxRegNetModel

[[autodoc]] FlaxRegNetModel
    - __call__

## FlaxRegNetForImageClassification

[[autodoc]] FlaxRegNetForImageClassification
88
89
90
    - __call__
</jax>
</frameworkcontent>