towhee.models.mpvit.mpvitΒΆ

Functions

create_model

Create MViT model.

dpr_generator

Generate drop path rate list following linear decay rule.

mpvit_base

mpvit_base :

mpvit_small

mpvit_small :

mpvit_tiny

mpvit_tiny :

mpvit_xsmall

mpvit_xsmall :

Classes

ClsHead

a linear layer for classification.

Conv2dBN

Convolution with BN module.

ConvPosEnc

Convolutional Position Encoding.

ConvRelPosEnc

Convolutional relative position encoding.

DWCPatchEmbed

Depthwise Convolutional Patch Embedding layer Image to Patch Embedding.

DWConv2dBN

Depthwise Separable Convolution with BN module.

FactorAttConvRelPosEnc

Factorized attention with convolutional relative position encoding class.

MHCABlock

Multi-Head Convolutional self-Attention block.

MHCAEncoder

Multi-Head Convolutional self-Attention Encoder comprised of MHCA blocks.

MHCAStage

Multi-Head Convolutional self-Attention stage comprised of MHCAEncoder layers.

MPViT

Multi-Path ViT class.

Mlp

Feed-forward network (FFN, a.k.a.

PatchEmbedStage

Depthwise Convolutional Patch Embedding stage comprised of DWCPatchEmbed layers.

ResBlock

Residual block for convolutional local feature.