class documentation
class ATD(nn.Module): (source)
Constructor: ATD(img_size, patch_size, in_chans, embed_dim, ...)
ATD
A PyTorch impl of : Transcending the Limit of Local Window: Advanced Super-Resolution Transformer with Adaptive Token Dictionary
.
Parameters | |
img | Input image size. Default 64 |
patch | Patch size. Default: 1 |
in | Number of input image channels. Default: 3 |
embed | Patch embedding dimension. Default: 96 |
depths | Depth of each Swin Transformer layer. |
num | Number of attention heads in different layers. |
window | Window size. Default: 7 |
mlp | Ratio of mlp hidden dim to embedding dim. Default: 2 |
qkv | If True, add a learnable bias to query, key, value. Default: True |
norm | Normalization layer. Default: nn.LayerNorm. |
ape | If True, add absolute position embedding to the patch embedding. Default: False |
patch | If True, add normalization after patch embedding. Default: True |
use | Whether to use checkpointing to save memory. Default: False |
upscale | Upscale factor. 2/3/4/8 for image SR, 1 for denoising and compress artifact reduction |
img | Image range. 1. or 255. |
upsampler | The reconstruction reconstruction module. 'pixelshuffle'/'pixelshuffledirect'/'nearest+conv'/None |
resi | The convolutional block before residual connection. '1conv'/'3conv' |
Method | __init__ |
Undocumented |
Method | calculate |
Undocumented |
Method | calculate |
Undocumented |
Method | forward |
Undocumented |
Method | forward |
Undocumented |
Method | no |
Undocumented |
Method | no |
Undocumented |
Class Variable | hyperparameters |
Undocumented |
Instance Variable | absolute |
Undocumented |
Instance Variable | ape |
Undocumented |
Instance Variable | conv |
Undocumented |
Instance Variable | conv |
Undocumented |
Instance Variable | conv |
Undocumented |
Instance Variable | conv |
Undocumented |
Instance Variable | embed |
Undocumented |
Instance Variable | img |
Undocumented |
Instance Variable | layers |
Undocumented |
Instance Variable | mean |
Undocumented |
Instance Variable | mlp |
Undocumented |
Instance Variable | no |
Undocumented |
Instance Variable | norm |
Undocumented |
Instance Variable | num |
Undocumented |
Instance Variable | num |
Undocumented |
Instance Variable | patch |
Undocumented |
Instance Variable | patch |
Undocumented |
Instance Variable | patch |
Undocumented |
Instance Variable | patches |
Undocumented |
Instance Variable | upsample |
Undocumented |
Instance Variable | upsampler |
Undocumented |
Instance Variable | upscale |
Undocumented |
Instance Variable | window |
Undocumented |
Property | is |
Undocumented |
Method | _init |
Undocumented |
def __init__(self, *, img_size=64, patch_size=1, in_chans=3, embed_dim=90, depths=( 6, 6, 6, 6), num_heads=( 6, 6, 6, 6), window_size=8, category_size=256, num_tokens=64, reducted_dim=4, convffn_kernel_size=5, mlp_ratio=2.0, qkv_bias=True, norm_layer=nn.LayerNorm, ape=False, patch_norm=True, upscale=1, img_range=1.0, upsampler='', resi_connection='1conv', norm=True):
(source)
¶
Undocumented