SYMBOL INDEX (131 symbols across 3 files) FILE: MeanFlow.py function timestep_embedding (line 20) | def timestep_embedding(timesteps, dim, max_period=10000): function norm_layer (line 42) | def norm_layer(channels): class AttentionBlock (line 46) | class AttentionBlock(nn.Module): method __init__ (line 47) | def __init__(self, channels, num_heads=1): method forward (line 63) | def forward(self, x): class Upsample (line 76) | class Upsample(nn.Module): method __init__ (line 77) | def __init__(self, channels, use_conv): method forward (line 83) | def forward(self, x): class Downsample (line 90) | class Downsample(nn.Module): method __init__ (line 91) | def __init__(self, channels, use_conv): method forward (line 99) | def forward(self, x): class TimestepBlock (line 103) | class TimestepBlock(nn.Module): method forward (line 109) | def forward(self, x, t, y): class TimestepEmbedSequential (line 116) | class TimestepEmbedSequential(nn.Sequential, TimestepBlock): method forward (line 121) | def forward(self, x, t, y): class Identity (line 130) | class Identity(nn.Module): method __init__ (line 131) | def __init__(self, *args, **kwargs): method forward (line 134) | def forward(self, x, *args, **kwargs): class Always (line 137) | class Always(): method __init__ (line 138) | def __init__(self, val): method __call__ (line 141) | def __call__(self, *args, **kwargs): class LayerNorm (line 145) | class LayerNorm(nn.Module): method __init__ (line 146) | def __init__(self, feats, stable=True, dim=-1): method forward (line 153) | def forward(self, x): class Block (line 163) | class Block(nn.Module): method __init__ (line 164) | def __init__( method forward (line 176) | def forward(self, x, scale_shift=None): class CrossAttention (line 187) | class CrossAttention(nn.Module): method __init__ (line 188) | def __init__( method forward (line 220) | def forward(self, x, context): class GlobalContext (line 242) | class GlobalContext(nn.Module): method __init__ (line 245) | def __init__( method forward (line 262) | def forward(self, x): class ResidualBlock (line 270) | class ResidualBlock(TimestepBlock): method __init__ (line 271) | def __init__(self, in_channels, out_channels, time_channels, dropout, ... method forward (line 291) | def forward(self, x, t, y): class UNetModel (line 317) | class UNetModel(nn.Module): method __init__ (line 322) | def __init__( method forward (line 419) | def forward(self, x: torch.FloatTensor, t: torch.LongTensor, y: torch.... function adaptive_l2_loss (line 450) | def adaptive_l2_loss(error, gamma=0.5, c=1e-3): class MeanFlow (line 459) | class MeanFlow: method __init__ (line 460) | def __init__(self, flow_ratio=0.50, time_dist='lognorm', method sample_t_r (line 468) | def sample_t_r(self, batch_size, device): method sample (line 490) | def sample(self, model: nn.Module, y: torch.LongTensor, image_size, ba... method train_losses (line 509) | def train_losses(self, model, x_start: torch.FloatTensor, t: torch.Lon... FILE: classifier_free_ddpm.py function timestep_embedding (line 20) | def timestep_embedding(timesteps, dim, max_period=10000): function norm_layer (line 42) | def norm_layer(channels): class AttentionBlock (line 46) | class AttentionBlock(nn.Module): method __init__ (line 47) | def __init__(self, channels, num_heads=1): method forward (line 63) | def forward(self, x): class Upsample (line 76) | class Upsample(nn.Module): method __init__ (line 77) | def __init__(self, channels, use_conv): method forward (line 83) | def forward(self, x): class Downsample (line 90) | class Downsample(nn.Module): method __init__ (line 91) | def __init__(self, channels, use_conv): method forward (line 99) | def forward(self, x): class TimestepBlock (line 103) | class TimestepBlock(nn.Module): method forward (line 109) | def forward(self, x, t, y): class TimestepEmbedSequential (line 116) | class TimestepEmbedSequential(nn.Sequential, TimestepBlock): method forward (line 121) | def forward(self, x, t, y): class Identity (line 130) | class Identity(nn.Module): method __init__ (line 131) | def __init__(self, *args, **kwargs): method forward (line 134) | def forward(self, x, *args, **kwargs): class Always (line 137) | class Always(): method __init__ (line 138) | def __init__(self, val): method __call__ (line 141) | def __call__(self, *args, **kwargs): class LayerNorm (line 145) | class LayerNorm(nn.Module): method __init__ (line 146) | def __init__(self, feats, stable=True, dim=-1): method forward (line 153) | def forward(self, x): class Block (line 163) | class Block(nn.Module): method __init__ (line 164) | def __init__( method forward (line 176) | def forward(self, x, scale_shift=None): class CrossAttention (line 187) | class CrossAttention(nn.Module): method __init__ (line 188) | def __init__( method forward (line 220) | def forward(self, x, context): class GlobalContext (line 242) | class GlobalContext(nn.Module): method __init__ (line 245) | def __init__( method forward (line 262) | def forward(self, x): class ResidualBlock (line 270) | class ResidualBlock(TimestepBlock): method __init__ (line 271) | def __init__(self, in_channels, out_channels, time_channels, dropout, ... method forward (line 291) | def forward(self, x, t, y): class UNetModel (line 317) | class UNetModel(nn.Module): method __init__ (line 322) | def __init__( method forward (line 419) | def forward(self, x: torch.FloatTensor, t: torch.LongTensor, y: torch.... function linear_beta_schedule (line 450) | def linear_beta_schedule(timesteps): function cosine_beta_schedule (line 460) | def cosine_beta_schedule(timesteps, s=0.008): class GaussianDiffusion (line 473) | class GaussianDiffusion: method __init__ (line 474) | def __init__( method _extract (line 507) | def _extract(self, a: torch.FloatTensor, t: torch.LongTensor, x_shape): method q_sample (line 514) | def q_sample(self, x_start: torch.FloatTensor, t: torch.LongTensor, no... method q_mean_variance (line 524) | def q_mean_variance(self, x_start: torch.FloatTensor, t: torch.LongTen... method q_posterior_mean_variance (line 531) | def q_posterior_mean_variance(self, x_start: torch.FloatTensor, x_t: t... method predict_start_from_noise (line 541) | def predict_start_from_noise(self, x_t: torch.FloatTensor, t: torch.Lo... method p_mean_variance (line 548) | def p_mean_variance(self, model, x_t: torch.FloatTensor, t: torch.Long... method p_sample (line 560) | def p_sample(self, model, x_t: torch.FloatTensor, t: torch.LongTensor,... method sample (line 572) | def sample(self, model: nn.Module, y: torch.LongTensor, image_size, ba... method train_losses (line 586) | def train_losses(self, model, x_start: torch.FloatTensor, t: torch.Lon... FILE: ddpm.py function timestep_embedding (line 13) | def timestep_embedding(timesteps, dim, max_period=10000): function norm_layer (line 35) | def norm_layer(channels): class AttentionBlock (line 39) | class AttentionBlock(nn.Module): method __init__ (line 40) | def __init__(self, channels, num_heads=1): method forward (line 56) | def forward(self, x): class Upsample (line 69) | class Upsample(nn.Module): method __init__ (line 70) | def __init__(self, channels, use_conv): method forward (line 76) | def forward(self, x): class Downsample (line 83) | class Downsample(nn.Module): method __init__ (line 84) | def __init__(self, channels, use_conv): method forward (line 92) | def forward(self, x): class TimestepBlock (line 96) | class TimestepBlock(nn.Module): method forward (line 102) | def forward(self, x, t): class TimestepEmbedSequential (line 109) | class TimestepEmbedSequential(nn.Sequential, TimestepBlock): method forward (line 114) | def forward(self, x, t): class ResidualBlock (line 123) | class ResidualBlock(TimestepBlock): method __init__ (line 124) | def __init__(self, in_channels, out_channels, time_channels, dropout): method forward (line 151) | def forward(self, x, t): class UNetModel (line 164) | class UNetModel(nn.Module): method __init__ (line 169) | def __init__( method forward (line 256) | def forward(self, x: torch.FloatTensor, timesteps: torch.LongTensor): function linear_beta_schedule (line 282) | def linear_beta_schedule(timesteps): function cosine_beta_schedule (line 292) | def cosine_beta_schedule(timesteps, s=0.008): class GaussianDiffusion (line 305) | class GaussianDiffusion: method __init__ (line 306) | def __init__( method _extract (line 339) | def _extract(self, a: torch.FloatTensor, t: torch.LongTensor, x_shape): method q_sample (line 346) | def q_sample(self, x_start: torch.FloatTensor, t: torch.LongTensor, no... method q_mean_variance (line 356) | def q_mean_variance(self, x_start: torch.FloatTensor, t: torch.LongTen... method q_posterior_mean_variance (line 363) | def q_posterior_mean_variance(self, x_start: torch.FloatTensor, x_t: t... method predict_start_from_noise (line 373) | def predict_start_from_noise(self, x_t: torch.FloatTensor, t: torch.Lo... method p_mean_variance (line 380) | def p_mean_variance(self, model, x_t: torch.FloatTensor, t: torch.Long... method p_sample (line 392) | def p_sample(self, model, x_t: torch.FloatTensor, t: torch.LongTensor,... method sample (line 404) | def sample(self, model: nn.Module, image_size, batch_size=8, channels=3): method train_losses (line 417) | def train_losses(self, model, x_start: torch.FloatTensor, t: torch.Lon...