class documentation

Dual Aggregation Transformer

Parameters
img_sizeInput image size. Default: 64
in_chansNumber of input image channels. Default: 3
embed_dimPatch embedding dimension. Default: 180
depthsDepth of each residual group (number of DATB in each RG).
split_sizeHeight and Width of spatial window.
num_headsNumber of attention heads in different residual groups.
expansion_factorRatio of ffn hidden dim to embedding dim. Default: 4
qkv_biasIf True, add a learnable bias to query, key, value. Default: True
qk_scaleOverride default qk scale of head_dim ** -0.5 if set. Default: None
drop_rateDropout rate. Default: 0
attn_drop_rateAttention dropout rate. Default: 0
drop_path_rateStochastic depth rate. Default: 0.1
act_layerActivation layer. Default: nn.GELU
norm_layerNormalization layer. Default: nn.LayerNorm
use_chkWhether to use checkpointing to save memory.
upscaleUpscale factor. 2/3/4 for image SR
img_rangeImage range. 1. or 255.
resi_connectionThe convolutional block before residual connection. '1conv'/'3conv'
Method __init__ Undocumented
Method forward Input: x: (B, C, H, W)
Method forward_features Undocumented
Class Variable hyperparameters Undocumented
Instance Variable before_RG Undocumented
Instance Variable conv_after_body Undocumented
Instance Variable conv_before_upsample Undocumented
Instance Variable conv_first Undocumented
Instance Variable conv_last Undocumented
Instance Variable embed_dim Undocumented
Instance Variable img_range Undocumented
Instance Variable layers Undocumented
Instance Variable mean Undocumented
Instance Variable norm Undocumented
Instance Variable num_features Undocumented
Instance Variable num_layers Undocumented
Instance Variable upsample Undocumented
Instance Variable upsampler Undocumented
Instance Variable upscale Undocumented
Instance Variable use_chk Undocumented
Method _init_weights Undocumented
def __init__(self, *, img_size=64, in_chans=3, embed_dim=180, split_size=[2, 4], depth=[2, 2, 2, 2], num_heads=[2, 2, 2, 2], expansion_factor=4.0, qkv_bias=True, qk_scale: float|None = None, drop_rate=0.0, attn_drop_rate=0.0, drop_path_rate=0.1, act_layer=nn.GELU, norm_layer=nn.LayerNorm, use_chk=False, upscale=2, img_range=1.0, resi_connection='1conv', upsampler='pixelshuffle'): (source)

Undocumented

def forward(self, x): (source)

Input: x: (B, C, H, W)

def forward_features(self, x): (source)

Undocumented

hyperparameters: dict = (source)

Undocumented

before_RG = (source)

Undocumented

conv_after_body = (source)

Undocumented

conv_before_upsample = (source)

Undocumented

conv_first = (source)

Undocumented

conv_last = (source)

Undocumented

embed_dim: int = (source)

Undocumented

img_range = (source)

Undocumented

Undocumented

Undocumented

Undocumented

num_features = (source)

Undocumented

num_layers = (source)

Undocumented

upsample = (source)

Undocumented

upsampler = (source)

Undocumented

Undocumented

use_chk: bool = (source)

Undocumented

def _init_weights(self, m): (source)

Undocumented