SYMBOL INDEX (229 symbols across 36 files) FILE: torchtools/lr_scheduler/delayed.py class DelayerScheduler (line 3) | class DelayerScheduler(_LRScheduler): method __init__ (line 12) | def __init__(self, optimizer, delay_epochs, after_scheduler): method get_lr (line 18) | def get_lr(self): method step (line 27) | def step(self, epoch=None): function DelayedCosineAnnealingLR (line 36) | def DelayedCosineAnnealingLR(optimizer, delay_epochs, cosine_annealing_e... FILE: torchtools/lr_scheduler/inverse_sqrt.py class InverseSqrtLR (line 6) | class InverseSqrtLR(LRScheduler): method __init__ (line 7) | def __init__(self, optimizer, lr, warmup_steps, pre_warmup_lr=None, la... method _process_lr (line 14) | def _process_lr(self, _): method get_lr (line 19) | def get_lr(self): method _get_closed_form_lr (line 26) | def _get_closed_form_lr(self): FILE: torchtools/nn/adain.py class AdaIN (line 4) | class AdaIN(nn.Module): method __init__ (line 5) | def __init__(self, n_channels): method forward (line 9) | def forward(self, image, style): FILE: torchtools/nn/alias_free_activation.py class AliasFreeActivation (line 13) | class AliasFreeActivation(nn.Module): method __init__ (line 14) | def __init__(self, activation, level, max_levels, max_size, max_channe... method alias_level_params (line 46) | def alias_level_params(level, max_levels, max_size, max_channels, star... method _lowpass_filter (line 60) | def _lowpass_filter(self, n_taps, cutoff, band_half, sr): method _kaiser_window (line 67) | def _kaiser_window(self, n_taps, f_h, sr): method _kaiser_attenuation (line 72) | def _kaiser_attenuation(self, n_taps, f_h, sr): method _kaiser_beta (line 77) | def _kaiser_beta(self, n_taps, f_h, sr): method forward (line 87) | def forward(self, x): method _upsample (line 96) | def _upsample(self, x, kernel, factor, pad=(0, 0)): method _downsample (line 101) | def _downsample(self, x, kernel, factor, pad=(0, 0)): method extra_repr (line 106) | def extra_repr(self): FILE: torchtools/nn/equal_layers.py class EqualLinear (line 12) | class EqualLinear(nn.Linear): method __init__ (line 13) | def __init__(self, *args, bias_init=0, lr_mul=1, **kwargs): method forward (line 23) | def forward(self, x): class EqualConv2d (line 27) | class EqualConv2d(nn.Conv2d): method __init__ (line 28) | def __init__(self, *args, **kwargs): method forward (line 38) | def forward(self, x): class EqualLeakyReLU (line 42) | class EqualLeakyReLU(nn.LeakyReLU): method __init__ (line 43) | def __init__(self, *args, scale=2**0.5, **kwargs): method forward (line 47) | def forward(self, x): FILE: torchtools/nn/evonorm2d.py class SwishImplementation (line 6) | class SwishImplementation(torch.autograd.Function): method forward (line 8) | def forward(ctx, i): method backward (line 13) | def backward(ctx, grad_output): class MemoryEfficientSwish (line 18) | class MemoryEfficientSwish(nn.Module): method forward (line 19) | def forward(self, x): function instance_std (line 22) | def instance_std(x, eps=1e-5): function group_std (line 28) | def group_std(x, groups = 32, eps = 1e-5): class EvoNorm2D (line 34) | class EvoNorm2D(nn.Module): method __init__ (line 36) | def __init__(self, input, non_linear = True, version = 'S0', efficient... method reset_parameters (line 65) | def reset_parameters(self): method _check_input_dim (line 68) | def _check_input_dim(self, x): method forward (line 73) | def forward(self, x): FILE: torchtools/nn/fourier_features.py class FourierFeatures2d (line 5) | class FourierFeatures2d(nn.Module): method __init__ (line 6) | def __init__(self, size, dim, cutoff, affine_eps=1e-8, freq_range=[-0.... method forward (line 28) | def forward(self, affine): method extra_repr (line 60) | def extra_repr(self): FILE: torchtools/nn/functional/gradient_penalty.py function gradient_penalty (line 9) | def gradient_penalty(netD, real_data, fake_data, l=10): FILE: torchtools/nn/functional/magnitude_preserving.py function mp_cat (line 3) | def mp_cat(*args, dim=1, t=0.5): function mp_sum (line 13) | def mp_sum(*args, t=0.5): FILE: torchtools/nn/functional/perceptual.py function total_variation (line 3) | def total_variation(X, reduction='sum'): FILE: torchtools/nn/functional/vq.py class vector_quantize (line 4) | class vector_quantize(Function): method forward (line 6) | def forward(ctx, x, codebook): method backward (line 21) | def backward(ctx, grad_output, grad_indices): class binarize (line 36) | class binarize(Function): method forward (line 38) | def forward(ctx, x, threshold=0.5): method backward (line 46) | def backward(ctx, grad_output): FILE: torchtools/nn/gp_loss.py class GPLoss (line 5) | class GPLoss(nn.Module): method __init__ (line 6) | def __init__(self, discriminator, l=10): method forward (line 11) | def forward(self, real_data, fake_data): FILE: torchtools/nn/haar_dwt.py class HaarForward (line 5) | class HaarForward(nn.Module): method __init__ (line 10) | def __init__(self, beta=2): method forward (line 15) | def forward(self, x: torch.Tensor) -> torch.Tensor: class HaarInverse (line 33) | class HaarInverse(nn.Module): method __init__ (line 38) | def __init__(self, beta=2): method forward (line 43) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: torchtools/nn/magnitude_preserving.py class MP_GELU (line 4) | class MP_GELU(nn.GELU): method forward (line 5) | def forward(self, x): class MP_SiLU (line 8) | class MP_SiLU(nn.SiLU): method forward (line 9) | def forward(self, x): class Gain (line 12) | class Gain(nn.Module): method __init__ (line 13) | def __init__(self, init_w=0.0): method forward (line 17) | def forward(self, x): FILE: torchtools/nn/mish.py class Mish (line 15) | class Mish(nn.Module): method __init__ (line 16) | def __init__(self): method forward (line 19) | def forward(self, x): FILE: torchtools/nn/modulation.py class ModulatedConv2d (line 11) | class ModulatedConv2d(nn.Conv2d): method __init__ (line 12) | def __init__(self, *args, demodulate=True, ema_decay=1.0, **kwargs): method forward (line 25) | def forward(self, x, w): FILE: torchtools/nn/perceptual.py class TVLoss (line 5) | class TVLoss(nn.Module): method __init__ (line 6) | def __init__(self, reduction='sum', alpha=1e-4): method forward (line 11) | def forward(self, x): FILE: torchtools/nn/pixel_normalzation.py class PixelNorm (line 4) | class PixelNorm(nn.Module): method __init__ (line 5) | def __init__(self, dim=1, eps=1e-4): method forward (line 10) | def forward(self, x): FILE: torchtools/nn/pos_embeddings.py class RotaryEmbedding (line 8) | class RotaryEmbedding(nn.Module): method __init__ (line 9) | def __init__(self, dim, base=10000): method forward (line 17) | def forward(self, x, seq_dim=1): function rotate_half (line 29) | def rotate_half(x): function apply_rotary_pos_emb (line 34) | def apply_rotary_pos_emb(q, k, cos, sin): FILE: torchtools/nn/simple_self_attention.py function conv1d (line 9) | def conv1d(ni, no, ks=1, stride=1, padding=0, bias=False): class SimpleSelfAttention (line 18) | class SimpleSelfAttention(nn.Module): method __init__ (line 20) | def __init__(self, n_in, ks=1, sym=False): method forward (line 27) | def forward(self, x): FILE: torchtools/nn/stylegan2/upfirdn2d.cpp function upfirdn2d (line 17) | torch::Tensor upfirdn2d(const torch::Tensor &input, const torch::Tensor ... function PYBIND11_MODULE (line 29) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { FILE: torchtools/nn/stylegan2/upfirdn2d.py class UpFirDn2dBackward (line 20) | class UpFirDn2dBackward(Function): method forward (line 22) | def forward( method backward (line 64) | def backward(ctx, gradgrad_input): class UpFirDn2d (line 89) | class UpFirDn2d(Function): method forward (line 91) | def forward(ctx, input, kernel, up, down, pad): method backward (line 128) | def backward(ctx, grad_output): function upfirdn2d (line 149) | def upfirdn2d(input, kernel, up=1, down=1, pad=(0, 0)): function upfirdn2d_native (line 168) | def upfirdn2d_native( FILE: torchtools/nn/transformers.py class GPTTransformerEncoderLayer (line 5) | class GPTTransformerEncoderLayer(nn.Module): method __init__ (line 6) | def __init__(self, d_model, nhead, dim_feedforward=2048, dropout=0): method forward (line 18) | def forward(self, x, src_mask=None, src_key_padding_mask=None): FILE: torchtools/nn/vq.py class VectorQuantize (line 6) | class VectorQuantize(nn.Module): method __init__ (line 7) | def __init__(self, embedding_size, k, ema_decay=0.99, ema_loss=False): method _laplace_smoothing (line 27) | def _laplace_smoothing(self, x, epsilon): method _updateEMA (line 31) | def _updateEMA(self, z_e_x, indices): method idx2vq (line 42) | def idx2vq(self, idx, dim=-1): method forward (line 48) | def forward(self, x, get_losses=True, dim=-1): class Binarize (line 67) | class Binarize(nn.Module): method __init__ (line 68) | def __init__(self, threshold=0.5): method forward (line 78) | def forward(self, x): class FSQ (line 82) | class FSQ(nn.Module): method __init__ (line 83) | def __init__(self, bins, dim=-1, eps=1e-1): method _round (line 93) | def _round(self, x, quantize): method vq_to_idx (line 102) | def vq_to_idx(self, x, is_sigmoid=False): method idx_to_vq (line 110) | def idx_to_vq(self, x): method forward (line 118) | def forward(self, x, quantize=True): FILE: torchtools/optim/lamb.py function log_lamb_rs (line 14) | def log_lamb_rs(optimizer: Optimizer, event_writer: SummaryWriter, token... class Lamb (line 29) | class Lamb(Optimizer): method __init__ (line 47) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-6, method step (line 62) | def step(self, closure=None): FILE: torchtools/optim/lookahead.py class Lookahead (line 16) | class Lookahead(Optimizer): method __init__ (line 17) | def __init__(self, base_optimizer, alpha=0.5, k=6): method update_slow (line 33) | def update_slow(self, group): method sync_lookahead (line 45) | def sync_lookahead(self): method step (line 49) | def step(self, closure=None): method state_dict (line 59) | def state_dict(self): method load_state_dict (line 73) | def load_state_dict(self, state_dict): function LookaheadAdam (line 100) | def LookaheadAdam(params, alpha=0.5, k=6, *args, **kwargs): FILE: torchtools/optim/novograd.py class AdamW (line 24) | class AdamW(Optimizer): method __init__ (line 47) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, method __setstate__ (line 61) | def __setstate__(self, state): method step (line 66) | def step(self, closure=None): class Novograd (line 124) | class Novograd(Optimizer): method __init__ (line 143) | def __init__(self, params, lr=1e-3, betas=(0.95, 0), eps=1e-8, method __setstate__ (line 160) | def __setstate__(self, state): method step (line 165) | def step(self, closure=None): FILE: torchtools/optim/over9000.py function Over9000 (line 17) | def Over9000(params, alpha=0.5, k=6, *args, **kwargs): FILE: torchtools/optim/radam.py class RAdam (line 10) | class RAdam(Optimizer): method __init__ (line 11) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weig... method __setstate__ (line 29) | def __setstate__(self, state): method step (line 32) | def step(self, closure=None): class PlainRAdam (line 100) | class PlainRAdam(Optimizer): method __init__ (line 102) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weig... method __setstate__ (line 117) | def __setstate__(self, state): method step (line 120) | def step(self, closure=None): class AdamW (line 177) | class AdamW(Optimizer): method __init__ (line 179) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weig... method __setstate__ (line 193) | def __setstate__(self, state): method step (line 196) | def step(self, closure=None): FILE: torchtools/optim/ralamb.py class Ralamb (line 9) | class Ralamb(Optimizer): method __init__ (line 11) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weig... method __setstate__ (line 16) | def __setstate__(self, state): method step (line 19) | def step(self, closure=None): FILE: torchtools/optim/ranger.py function Ranger (line 14) | def Ranger(params, alpha=0.5, k=6, betas=(.95, 0.999), *args, **kwargs): FILE: torchtools/transforms/smart_crop.py class ResBlock (line 8) | class ResBlock(nn.Module): method __init__ (line 9) | def __init__(self, channels): method forward (line 22) | def forward(self, x): class Upsample2d (line 26) | class Upsample2d(nn.Module): method __init__ (line 27) | def __init__(self, scale_factor): method forward (line 33) | def forward(self, x): class MicroResNet (line 37) | class MicroResNet(nn.Module): method __init__ (line 38) | def __init__(self): method forward (line 73) | def forward(self, x): class SmartCrop (line 80) | class SmartCrop(nn.Module): method __init__ (line 81) | def __init__(self, output_size, randomize_p=0.0, randomize_q=0.1, temp... method forward (line 92) | def forward(self, image): FILE: torchtools/utils/diffusion.py class SimpleSampler (line 4) | class SimpleSampler(): method __init__ (line 5) | def __init__(self, diffuzz): method __call__ (line 9) | def __call__(self, *args, **kwargs): method init_x (line 13) | def init_x(self, shape): method step (line 16) | def step(self, x, t, t_prev, noise): class DDPMSampler (line 19) | class DDPMSampler(SimpleSampler): method step (line 20) | def step(self, x, t, t_prev, noise): class DDIMSampler (line 29) | class DDIMSampler(SimpleSampler): method step (line 30) | def step(self, x, t, t_prev, noise): class DPMSolverPlusPlusSampler (line 38) | class DPMSolverPlusPlusSampler(SimpleSampler): # FIXME: CURRENTLY NOT W... method __init__ (line 39) | def __init__(self, *args, **kwargs): method _get_coef (line 43) | def _get_coef(self, alpha_cumprod): method init_x (line 50) | def init_x(self, shape): method step (line 54) | def step(self, x, t, t_prev, noise): class Diffuzz (line 89) | class Diffuzz(): method __init__ (line 90) | def __init__(self, s=0.008, device="cpu", cache_steps=None, scaler=1, ... method _alpha_cumprod (line 100) | def _alpha_cumprod(self, t): method diffuse (line 111) | def diffuse(self, x, t, noise=None): # t -> [0, 1] method undiffuse (line 117) | def undiffuse(self, x, t, t_prev, noise, sampler=None): method sample (line 122) | def sample(self, model, model_inputs, shape, mask=None, t_start=1.0, t... method p2_weight (line 152) | def p2_weight(self, t, k=1.0, gamma=1.0): FILE: torchtools/utils/diffusion2.py class SimpleSampler (line 5) | class SimpleSampler(): method __init__ (line 6) | def __init__(self, diffuzz, mode="v"): method __call__ (line 13) | def __call__(self, *args, **kwargs): method init_x (line 17) | def init_x(self, shape): method step (line 20) | def step(self, x, t, t_prev, noise): class DDIMSampler (line 24) | class DDIMSampler(SimpleSampler): method step (line 25) | def step(self, x, t, t_prev, pred, eta=0): class DDPMSampler (line 42) | class DDPMSampler(DDIMSampler): method step (line 43) | def step(self, x, t, t_prev, pred, eta=1): class Diffuzz2 (line 52) | class Diffuzz2(): method __init__ (line 53) | def __init__(self, s=0.008, device="cpu", cache_steps=None, scaler=1, ... method _alpha_cumprod (line 63) | def _alpha_cumprod(self, t): method scale_t (line 73) | def scale_t(self, t, scaler): method diffuse (line 81) | def diffuse(self, x, t, noise=None): # t -> [0, 1] method get_v (line 87) | def get_v(self, x, t, noise): method x0_from_v (line 93) | def x0_from_v(self, noised, pred_v, t): method noise_from_v (line 97) | def noise_from_v(self, noised, pred_v, t): method undiffuse (line 101) | def undiffuse(self, x, t, t_prev, pred, sampler=None, **kwargs): method sample (line 106) | def sample(self, model, model_inputs, shape, mask=None, t_start=1.0, t... method p2_weight (line 158) | def p2_weight(self, t, k=1.0, gamma=1.0): method truncated_snr_weight (line 162) | def truncated_snr_weight(self, t, min=1.0, max=None): FILE: torchtools/utils/gamma_parametrization.py class _GammaScaling (line 5) | class _GammaScaling(nn.Module): method __init__ (line 6) | def __init__(self): method forward (line 10) | def forward(self, w): function apply_gamma_reparam (line 13) | def apply_gamma_reparam(module, name="weight"): # this reparametrizes th... function gamma_reparam_model (line 18) | def gamma_reparam_model(model): function remove_gamma_reparam (line 26) | def remove_gamma_reparam(model): FILE: torchtools/utils/weight_normalization.py class _WeigthNorm (line 4) | class _WeigthNorm(nn.Module): method __init__ (line 5) | def __init__(self, eps=1e-4): method _normalize (line 9) | def _normalize(self, w): method forward (line 15) | def forward(self, w): function apply_weight_norm (line 23) | def apply_weight_norm(module, name="weight", init_weight=True): # this r... function weight_norm_model (line 29) | def weight_norm_model(model, whitelist=None, init_weight=True): function remove_weight_norm (line 43) | def remove_weight_norm(model):