SYMBOL INDEX (296 symbols across 23 files) FILE: BigGAN_utils/BigGAN.py function G_arch (line 19) | def G_arch(ch=64, attention='64', ksize='333333', dilation='111111'): class Generator (line 54) | class Generator(nn.Module): method __init__ (line 55) | def __init__(self, G_ch=64, dim_z=128, bottom_width=4, resolution=128, method init_weights (line 210) | def init_weights(self): method forward (line 231) | def forward(self, z, y, w_y=None): method forward_org (line 264) | def forward_org(self, z, y): function D_arch (line 289) | def D_arch(ch=64, attention='64',ksize='333333', dilation='111111'): class Discriminator (line 317) | class Discriminator(nn.Module): method __init__ (line 319) | def __init__(self, D_ch=64, D_wide=True, resolution=128, method init_weights (line 408) | def init_weights(self): method forward (line 425) | def forward(self, x, y=None): class G_D (line 442) | class G_D(nn.Module): method __init__ (line 443) | def __init__(self, G, D): method forward (line 448) | def forward(self, z, gy, x=None, dy=None, train_G=False, return_G_z=Fa... FILE: BigGAN_utils/BigGANdeep.py class GBlock (line 23) | class GBlock(nn.Module): method __init__ (line 24) | def __init__(self, in_channels, out_channels, method forward (line 48) | def forward(self, x, y): function G_arch (line 67) | def G_arch(ch=64, attention='64', ksize='333333', dilation='111111'): class Generator (line 96) | class Generator(nn.Module): method __init__ (line 97) | def __init__(self, G_ch=64, G_depth=2, dim_z=128, bottom_width=4, reso... method init_weights (line 243) | def init_weights(self): method forward (line 265) | def forward(self, z, y): class DBlock (line 283) | class DBlock(nn.Module): method __init__ (line 284) | def __init__(self, in_channels, out_channels, which_conv=layers.SNConv... method shortcut (line 308) | def shortcut(self, x): method forward (line 315) | def forward(self, x): function D_arch (line 331) | def D_arch(ch=64, attention='64',ksize='333333', dilation='111111'): class Discriminator (line 359) | class Discriminator(nn.Module): method __init__ (line 361) | def __init__(self, D_ch=64, D_wide=True, D_depth=2, resolution=128, method init_weights (line 458) | def init_weights(self): method forward (line 475) | def forward(self, x, y=None): class G_D (line 492) | class G_D(nn.Module): method __init__ (line 493) | def __init__(self, G, D): method forward (line 498) | def forward(self, z, gy, x=None, dy=None, train_G=False, return_G_z=Fa... FILE: BigGAN_utils/TFHub/biggan_v1.py function l2normalize (line 12) | def l2normalize(v, eps=1e-4): function truncated_z_sample (line 16) | def truncated_z_sample(batch_size, z_dim, truncation=0.5, seed=None): function denorm (line 22) | def denorm(x): class SpectralNorm (line 27) | class SpectralNorm(nn.Module): method __init__ (line 28) | def __init__(self, module, name='weight', power_iterations=1): method _update_u_v (line 36) | def _update_u_v(self): method _made_params (line 50) | def _made_params(self): method _make_params (line 59) | def _make_params(self): method forward (line 76) | def forward(self, *args): class SelfAttention (line 81) | class SelfAttention(nn.Module): method __init__ (line 84) | def __init__(self, in_dim, activation=F.relu): method forward (line 98) | def forward(self, x): class ConditionalBatchNorm2d (line 115) | class ConditionalBatchNorm2d(nn.Module): method __init__ (line 116) | def __init__(self, num_features, num_classes, eps=1e-4, momentum=0.1): method forward (line 123) | def forward(self, x, y): class GBlock (line 131) | class GBlock(nn.Module): method __init__ (line 132) | def __init__( method forward (line 168) | def forward(self, input, condition=None): class Generator128 (line 197) | class Generator128(nn.Module): method __init__ (line 198) | def __init__(self, code_dim=120, n_class=1000, chn=96, debug=False): method forward (line 226) | def forward(self, input, class_id): class Generator256 (line 244) | class Generator256(nn.Module): method __init__ (line 245) | def __init__(self, code_dim=140, n_class=1000, chn=96, debug=False): method forward (line 272) | def forward(self, input, class_id): class Generator512 (line 290) | class Generator512(nn.Module): method __init__ (line 291) | def __init__(self, code_dim=128, n_class=1000, chn=96, debug=False): method forward (line 321) | def forward(self, input, class_id): class Discriminator (line 339) | class Discriminator(nn.Module): method __init__ (line 340) | def __init__(self, n_class=1000, chn=96, debug=False): method forward (line 376) | def forward(self, input, class_id): FILE: BigGAN_utils/TFHub/converter.py function dump_tfhub_to_hdf5 (line 43) | def dump_tfhub_to_hdf5(module_path, hdf5_path, redownload=False): class TFHub2Pytorch (line 74) | class TFHub2Pytorch(object): method __init__ (line 91) | def __init__(self, state_dict, tf_weights, resolution=256, load_ema=Tr... method load (line 100) | def load(self): method load_generator (line 104) | def load_generator(self): method load_linear (line 119) | def load_linear(self, name_pth, name_tf, bias=True): method load_snlinear (line 124) | def load_snlinear(self, name_pth, name_tf, bias=True): method load_colorize (line 131) | def load_colorize(self, name_pth, name_tf): method load_GBlock (line 134) | def load_GBlock(self, name_pth, name_tf): method load_convs (line 138) | def load_convs(self, name_pth, name_tf): method load_snconv (line 143) | def load_snconv(self, name_pth, name_tf, bias=True): method load_conv (line 152) | def load_conv(self, name_pth, name_tf, bias=True): method load_HyperBNs (line 160) | def load_HyperBNs(self, name_pth, name_tf): method load_ScaledCrossReplicaBNs (line 164) | def load_ScaledCrossReplicaBNs(self, name_pth, name_tf): method load_HyperBN (line 172) | def load_HyperBN(self, name_pth, name_tf): method load_attention (line 191) | def load_attention(self, name_pth, name_tf): method load_tf_tensor (line 199) | def load_tf_tensor(self, prefix, var, device='0'): function convert_from_v1 (line 204) | def convert_from_v1(hub_dict, resolution=128): function get_config (line 283) | def get_config(resolution): function convert_biggan (line 304) | def convert_biggan(resolution, weight_dir, redownload=False, no_ema=Fals... function generate_sample (line 328) | def generate_sample(G, z_dim, batch_size, filename, parallel=False): function parse_args (line 342) | def parse_args(): FILE: BigGAN_utils/binary_utils.py class BinaryActivation (line 5) | class BinaryActivation(Function): method forward (line 8) | def forward(ctx, x): method backward (line 13) | def backward(ctx, grad_output): FILE: BigGAN_utils/calculate_inception_moments.py function prepare_parser (line 19) | def prepare_parser(): function run (line 49) | def run(config): function main (line 82) | def main(): FILE: BigGAN_utils/datasets.py function is_image_file (line 20) | def is_image_file(filename): function find_classes (line 33) | def find_classes(dir): function make_dataset (line 40) | def make_dataset(dir, class_to_idx): function pil_loader (line 58) | def pil_loader(path): function accimage_loader (line 65) | def accimage_loader(path): function default_loader (line 74) | def default_loader(path): class ImageFolder (line 82) | class ImageFolder(data.Dataset): method __init__ (line 107) | def __init__(self, root, transform=None, target_transform=None, method __getitem__ (line 143) | def __getitem__(self, index): method __len__ (line 166) | def __len__(self): method __repr__ (line 169) | def __repr__(self): class ILSVRC_HDF5 (line 184) | class ILSVRC_HDF5(data.Dataset): method __init__ (line 185) | def __init__(self, root, transform=None, target_transform=None, method __getitem__ (line 208) | def __getitem__(self, index): method __len__ (line 238) | def __len__(self): class CIFAR10 (line 243) | class CIFAR10(dset.CIFAR10): method __init__ (line 245) | def __init__(self, root, train=True, method __getitem__ (line 326) | def __getitem__(self, index): method __len__ (line 347) | def __len__(self): class CIFAR100 (line 351) | class CIFAR100(CIFAR10): FILE: BigGAN_utils/inception_tf13.py function prepare_parser (line 29) | def prepare_parser(): function run (line 44) | def run(config): function main (line 130) | def main(): FILE: BigGAN_utils/inception_utils.py class WrapInception (line 27) | class WrapInception(nn.Module): method __init__ (line 28) | def __init__(self, net): method forward (line 35) | def forward(self, x): function torch_cov (line 89) | def torch_cov(m, rowvar=False): function sqrt_newton_schulz (line 124) | def sqrt_newton_schulz(A, numIters, dtype=None): function numpy_calculate_frechet_distance (line 144) | def numpy_calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6): function torch_calculate_frechet_distance (line 200) | def torch_calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6): function calculate_inception_score (line 235) | def calculate_inception_score(pred, num_splits=10): function accumulate_inception_activations (line 248) | def accumulate_inception_activations(sample, net, num_inception_images=5... function load_inception_net (line 261) | def load_inception_net(parallel=False): function prepare_inception_metrics (line 274) | def prepare_inception_metrics(dataset, parallel, no_fid=False): FILE: BigGAN_utils/layers.py function proj (line 16) | def proj(x, y): function gram_schmidt (line 21) | def gram_schmidt(x, ys): function power_iteration (line 28) | def power_iteration(W, u_, update=True, eps=1e-12): class identity (line 54) | class identity(nn.Module): method forward (line 55) | def forward(self, input): class SN (line 60) | class SN(object): method __init__ (line 61) | def __init__(self, num_svs, num_itrs, num_outputs, transpose=False, ep... method u (line 77) | def u(self): method sv (line 83) | def sv(self): method W_ (line 87) | def W_(self): class SNConv2d (line 103) | class SNConv2d(nn.Conv2d, SN): method __init__ (line 104) | def __init__(self, in_channels, out_channels, kernel_size, stride=1, method forward (line 110) | def forward(self, x): class SNLinear (line 116) | class SNLinear(nn.Linear, SN): method __init__ (line 117) | def __init__(self, in_features, out_features, bias=True, method forward (line 121) | def forward(self, x): class SNEmbedding (line 128) | class SNEmbedding(nn.Embedding, SN): method __init__ (line 129) | def __init__(self, num_embeddings, embedding_dim, padding_idx=None, method forward (line 137) | def forward(self, x): class Attention (line 144) | class Attention(nn.Module): method __init__ (line 145) | def __init__(self, ch, which_conv=SNConv2d, name='attention'): method forward (line 156) | def forward(self, x, y=None): function fused_bn (line 173) | def fused_bn(x, mean, var, gain=None, bias=None, eps=1e-5): function manual_bn (line 191) | def manual_bn(x, gain=None, bias=None, return_mean_var=False, eps=1e-5): class myBN (line 212) | class myBN(nn.Module): method __init__ (line 213) | def __init__(self, num_channels, eps=1e-5, momentum=0.1): method reset_stats (line 229) | def reset_stats(self): method forward (line 234) | def forward(self, x, gain, bias): function groupnorm (line 259) | def groupnorm(x, norm_style): class ccbn (line 278) | class ccbn(nn.Module): method __init__ (line 279) | def __init__(self, output_size, input_size, which_linear, eps=1e-5, mo... method forward (line 306) | def forward(self, x, y): method extra_repr (line 326) | def extra_repr(self): class bn (line 333) | class bn(nn.Module): method __init__ (line 334) | def __init__(self, output_size, eps=1e-5, momentum=0.1, method forward (line 359) | def forward(self, x, y=None): class GBlock (line 375) | class GBlock(nn.Module): method __init__ (line 376) | def __init__(self, in_channels, out_channels, method forward (line 398) | def forward(self, x, y): class DBlock (line 412) | class DBlock(nn.Module): method __init__ (line 413) | def __init__(self, in_channels, out_channels, which_conv=SNConv2d, wid... method shortcut (line 431) | def shortcut(self, x): method forward (line 444) | def forward(self, x): FILE: BigGAN_utils/losses.py function loss_dcgan_dis (line 5) | def loss_dcgan_dis(dis_fake, dis_real): function loss_dcgan_gen (line 11) | def loss_dcgan_gen(dis_fake): function loss_hinge_dis (line 17) | def loss_hinge_dis(dis_fake, dis_real): function loss_hinge_gen (line 27) | def loss_hinge_gen(dis_fake): FILE: BigGAN_utils/make_hdf5.py function prepare_parser (line 20) | def prepare_parser(): function run (line 45) | def run(config): function main (line 102) | def main(): FILE: BigGAN_utils/sample.py function run (line 24) | def run(config): function main (line 174) | def main(): FILE: BigGAN_utils/sync_batchnorm/batchnorm.py function _sum_ft (line 24) | def _sum_ft(tensor): function _unsqueeze_ft (line 29) | def _unsqueeze_ft(tensor): class _SynchronizedBatchNorm (line 38) | class _SynchronizedBatchNorm(_BatchNorm): method __init__ (line 39) | def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=True): method forward (line 48) | def forward(self, input, gain=None, bias=None): method __data_parallel_replicate__ (line 110) | def __data_parallel_replicate__(self, ctx, copy_id): method _data_parallel_master (line 120) | def _data_parallel_master(self, intermediates): method _compute_mean_std (line 147) | def _compute_mean_std(self, sum_, ssum, size): class SynchronizedBatchNorm1d (line 162) | class SynchronizedBatchNorm1d(_SynchronizedBatchNorm): method _check_input_dim (line 218) | def _check_input_dim(self, input): class SynchronizedBatchNorm2d (line 225) | class SynchronizedBatchNorm2d(_SynchronizedBatchNorm): method _check_input_dim (line 281) | def _check_input_dim(self, input): class SynchronizedBatchNorm3d (line 288) | class SynchronizedBatchNorm3d(_SynchronizedBatchNorm): method _check_input_dim (line 345) | def _check_input_dim(self, input): FILE: BigGAN_utils/sync_batchnorm/batchnorm_reimpl.py class BatchNorm2dReimpl (line 18) | class BatchNorm2dReimpl(nn.Module): method __init__ (line 27) | def __init__(self, num_features, eps=1e-5, momentum=0.1): method reset_running_stats (line 39) | def reset_running_stats(self): method reset_parameters (line 43) | def reset_parameters(self): method forward (line 48) | def forward(self, input_): FILE: BigGAN_utils/sync_batchnorm/comm.py class FutureResult (line 18) | class FutureResult(object): method __init__ (line 21) | def __init__(self): method put (line 26) | def put(self, result): method get (line 32) | def get(self): class SlavePipe (line 46) | class SlavePipe(_SlavePipeBase): method run_slave (line 49) | def run_slave(self, msg): class SyncMaster (line 56) | class SyncMaster(object): method __init__ (line 67) | def __init__(self, master_callback): method __getstate__ (line 78) | def __getstate__(self): method __setstate__ (line 81) | def __setstate__(self, state): method register_slave (line 84) | def register_slave(self, identifier): method run_master (line 102) | def run_master(self, master_msg): method nr_slaves (line 136) | def nr_slaves(self): FILE: BigGAN_utils/sync_batchnorm/replicate.py class CallbackContext (line 23) | class CallbackContext(object): function execute_replication_callbacks (line 27) | def execute_replication_callbacks(modules): class DataParallelWithCallback (line 50) | class DataParallelWithCallback(DataParallel): method replicate (line 64) | def replicate(self, module, device_ids): function patch_replication_callback (line 70) | def patch_replication_callback(data_parallel): FILE: BigGAN_utils/sync_batchnorm/unittest.py class TorchTestCase (line 15) | class TorchTestCase(unittest.TestCase): method assertTensorClose (line 16) | def assertTensorClose(self, x, y): FILE: BigGAN_utils/train.py function run (line 34) | def run(config): function main (line 219) | def main(): FILE: BigGAN_utils/train_fns.py function dummy_training_function (line 14) | def dummy_training_function(): function GAN_training_function (line 20) | def GAN_training_function(G, D, GD, z_, y_, ema, state_dict, config): function save_and_sample (line 98) | def save_and_sample(G, D, G_ema, z_, y_, fixed_z, fixed_y, function test (line 164) | def test(G, D, G_ema, z_, y_, state_dict, config, sample, get_inception_... FILE: BigGAN_utils/utils.py function prepare_parser (line 30) | def prepare_parser(): function add_sample_parser (line 368) | def add_sample_parser(parser): class CenterCropLongEdge (line 436) | class CenterCropLongEdge(object): method __call__ (line 443) | def __call__(self, img): method __repr__ (line 452) | def __repr__(self): class RandomCropLongEdge (line 455) | class RandomCropLongEdge(object): method __call__ (line 462) | def __call__(self, img): method __repr__ (line 477) | def __repr__(self): class MultiEpochSampler (line 483) | class MultiEpochSampler(torch.utils.data.Sampler): method __init__ (line 492) | def __init__(self, data_source, num_epochs, start_itr=0, batch_size=128): method __iter__ (line 503) | def __iter__(self): method __len__ (line 521) | def __len__(self): function get_data_loaders (line 526) | def get_data_loaders(dataset, data_root=None, augment=False, batch_size=64, function seed_rng (line 589) | def seed_rng(seed): function update_config_roots (line 597) | def update_config_roots(config): function prepare_root (line 606) | def prepare_root(config): class ema (line 616) | class ema(object): method __init__ (line 617) | def __init__(self, source, target, decay=0.9999, start_itr=0): method update (line 632) | def update(self, itr=None): function ortho (line 648) | def ortho(model, strength=1e-4, blacklist=[]): function default_ortho (line 663) | def default_ortho(model, strength=1e-4, blacklist=[]): function toggle_grad (line 676) | def toggle_grad(model, on_or_off): function join_strings (line 684) | def join_strings(base_string, strings): function save_weights (line 689) | def save_weights(G, D, state_dict, weights_root, experiment_name, function load_weights (line 714) | def load_weights(G, D, state_dict, weights_root, experiment_name, class MetricsLogger (line 746) | class MetricsLogger(object): method __init__ (line 747) | def __init__(self, fname, reinitialize=False): method log (line 755) | def log(self, record=None, **kwargs): class MyLogger (line 773) | class MyLogger(object): method __init__ (line 774) | def __init__(self, fname, reinitialize=False, logstyle='%3.3f'): method reinit (line 783) | def reinit(self, item): method log (line 795) | def log(self, itr, **kwargs): function write_metadata (line 813) | def write_metadata(logs_root, experiment_name, config, state_dict): function progress (line 828) | def progress(items, desc='', total=None, min_delay=0.1, displaytype='s1k'): function sample (line 867) | def sample(G, z_, y_, config): function sample_sheet (line 879) | def sample_sheet(G, classes_per_sheet, num_classes, samples_per_class, p... function interp (line 914) | def interp(x0, x1, num_midpoints): function interp_sheet (line 921) | def interp_sheet(G, num_per_sheet, num_midpoints, num_classes, parallel, function print_grad_norms (line 958) | def print_grad_norms(net): function get_SVs (line 971) | def get_SVs(net, prefix): function name_from_config (line 979) | def name_from_config(config): function hashname (line 1028) | def hashname(name): function query_gpu (line 1039) | def query_gpu(indices): function count_parameters (line 1044) | def count_parameters(module): function sample_1hot (line 1050) | def sample_1hot(batch_size, num_classes, device='cuda'): class Distribution (line 1062) | class Distribution(torch.Tensor): method init_distribution (line 1064) | def init_distribution(self, dist_type, **kwargs): method sample_ (line 1072) | def sample_(self): method to (line 1081) | def to(self, *args, **kwargs): function prepare_z_y (line 1089) | def prepare_z_y(G_batch_size, dim_z, nclasses, device='cuda', function initiate_standing_stats (line 1104) | def initiate_standing_stats(net): function accumulate_standing_stats (line 1111) | def accumulate_standing_stats(net, z, y, nclasses, num_accumulations=16): class Adam16 (line 1131) | class Adam16(Optimizer): method __init__ (line 1132) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8,weigh... method load_state_dict (line 1139) | def load_state_dict(self, state_dict): method step (line 1147) | def step(self, closure=None): FILE: DiffAugment_pytorch.py function DiffAugment (line 10) | def DiffAugment(x, policy='', channels_first=True): function rand_brightness (line 23) | def rand_brightness(x): function rand_saturation (line 28) | def rand_saturation(x): function rand_contrast (line 34) | def rand_contrast(x): function rand_translation (line 40) | def rand_translation(x, ratio=0.125): ### ratio: org: 0.125 function rand_resize (line 55) | def rand_resize(x, min_ratio=0.8, max_ratio=1.2): ### ratio: org: 0.125 function rand_cutout (line 80) | def rand_cutout(x, ratio=0.5): FILE: fusedream_utils.py function AugmentLoss (line 19) | def AugmentLoss(img, clip_model, text, replicate=10, interp_mode='biline... function NaiveSemanticLoss (line 33) | def NaiveSemanticLoss(img, clip_model, text, interp_mode='bilinear'): function get_gaussian_mask (line 46) | def get_gaussian_mask(size=256): function save_image (line 59) | def save_image(img, path, n_per_row=1): function get_G (line 68) | def get_G(resolution=256): class FuseDreamBaseGenerator (line 144) | class FuseDreamBaseGenerator(): method __init__ (line 145) | def __init__(self, G, G_config, G_batch_size=10, clip_mode="ViT-B/32",... method generate_basis (line 170) | def generate_basis(self, text, init_iters=500, num_basis=5): method optimize_clip_score (line 218) | def optimize_clip_score(self, z_init_cllt, y_init_cllt, text, latent_n... method measureAugCLIP (line 291) | def measureAugCLIP(self, z, y, text, augment=False, num_samples=20):