models.utils.rst 903 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.. role:: hidden
    :class: hidden-section

mmcls.models.utils
===================================

This package includes some helper functions and common components used in various networks.

.. contents:: mmcls.models.utils
   :depth: 2
   :local:
   :backlinks: top

.. currentmodule:: mmcls.models.utils

Common Components
------------------

.. autosummary::
   :toctree: generated
   :nosignatures:
   :template: classtemplate.rst

   InvertedResidual
   SELayer
   ShiftWindowMSA
   MultiheadAttention
   ConditionalPositionEncoding

Helper Functions
------------------

channel_shuffle
^^^^^^^^^^^^^^^
.. autofunction:: channel_shuffle

make_divisible
^^^^^^^^^^^^^^
.. autofunction:: make_divisible

to_ntuple
^^^^^^^^^^^^^^
.. autofunction:: to_ntuple
.. autofunction:: to_2tuple
.. autofunction:: to_3tuple
.. autofunction:: to_4tuple

is_tracing
^^^^^^^^^^^^^^
.. autofunction:: is_tracing