MCPcopy Create free account

hub / github.com/Ha0Tang/AttentionGAN / functions

Functions242 in github.com/Ha0Tang/AttentionGAN

↓ 16 callersFunctionsave_image
Save a numpy image to the disk Parameters: image_numpy (numpy array) -- input numpy array image_path (str) -- the path o
util/util.py:49
↓ 14 callersMethodstep
(self, epoch)
AttentionGAN-v1/utils.py:115
↓ 12 callersMethodsave
save the current content to the HMTL file
util/html.py:68
↓ 8 callersMethod__init__
Initialize the GANLoss class. Parameters: gan_mode (str) - - the type of GAN objective. It currently supports vanilla, lsgan, an
AttentionGAN-geo/networks.py:220
↓ 8 callersMethod__init__
Initialize the GANLoss class. Parameters: gan_mode (str) - - the type of GAN objective. It currently supports vanilla, lsgan, an
models/networks.py:220
↓ 8 callersFunctionget_images
(filename)
scripts/GAN_Metrics-Tensorflow/inception_score.py:57
↓ 6 callersMethoddenorm
Convert the range from [-1, 1] to [0, 1].
AttentionGAN-v1-multi/solver.py:123
↓ 6 callersMethodeval
Make models eval mode during test time
models/base_model.py:91
↓ 6 callersFunctionget_kid
(kcd, batch_size, images1, images2, inception_images, real_activation, fake_activation, activations)
scripts/GAN_Metrics-Tensorflow/frechet_kernel_Inception_distance.py:341
↓ 6 callersMethodquery
Return an image from the pool. Parameters: images: the latest generated images from the generator Returns images from th
util/image_pool.py:23
↓ 6 callersMethodset_requires_grad
Set requies_grad=Fasle for all the networks to avoid unnecessary computations Parameters: nets (network list) -- a list of netwo
models/base_model.py:218
↓ 4 callersMethodcreate_visdom_connections
If the program could not connect to Visdom server, this function will start a new server at port < self.port >
util/visualizer.py:97
↓ 4 callersMethodforward
(self, input)
AttentionGAN-v1/models.py:49
↓ 4 callersFunctionget_inception_activations
(batch_size, images, inception_images, activations)
scripts/GAN_Metrics-Tensorflow/frechet_kernel_Inception_distance.py:319
↓ 4 callersFunctionprint_network
(net)
AttentionGAN-v1/utils.py:11
↓ 3 callersMethodadd_header
Insert a header to the HTML file Parameters: text (str) -- the header text
util/html.py:39
↓ 3 callersMethodadd_images
add images to the HTML file Parameters: ims (str list) -- a list of image paths txts (str list) -- a list of image
util/html.py:48
↓ 3 callersMethodget
Download a dataset. Parameters: save_path (str) -- A directory to save the data to. dataset (str) -- (opt
util/get_data.py:79
↓ 3 callersFunctionget_fid
(fcd, batch_size, images1, images2, inception_images, real_activation, fake_activation, activations)
scripts/GAN_Metrics-Tensorflow/frechet_kernel_Inception_distance.py:332
↓ 3 callersFunctioninception_activations
(images, num_splits=1)
scripts/GAN_Metrics-Tensorflow/frechet_kernel_Inception_distance.py:303
↓ 3 callersMethodlabel2onehot
Convert label indices to one-hot vectors.
AttentionGAN-v1-multi/solver.py:142
↓ 3 callersFunctionmake_dataset
(dir, max_dataset_size=float("inf"))
data/image_folder.py:23
↓ 3 callersMethodsave_networks
Save all the networks to the disk. Parameters: epoch (int) -- current epoch; used in the file name '%s_net_%s.pth' % (epoch, name
models/base_model.py:143
↓ 2 callersMethod__init__
(self, input_nc=3, output_nc=4, ngf=64, norm_layer=nn.BatchNorm2d, use_dropout=False, n_blocks=6)
AttentionGAN-v1/models.py:7
↓ 2 callersMethod__init__
(self, conv_dim=64, c_dim=5, repeat_num=6)
AttentionGAN-v1-multi/model.py:24
↓ 2 callersMethod_print
(self, text)
util/get_data.py:35
↓ 2 callersFunction_symmetric_matrix_square_root
Compute square root of a symmetric matrix. Note that this is different from an elementwise square root. We want to compute M' where M' = sqrt(
scripts/GAN_Metrics-Tensorflow/frechet_kernel_Inception_distance.py:17
↓ 2 callersFunctionactivations2distance
(fcd, real_activation, fake_activation, act1, act2)
scripts/GAN_Metrics-Tensorflow/frechet_kernel_Inception_distance.py:328
↓ 2 callersMethodbackward_D_basic
Calculate GAN loss for the discriminator Parameters: netD (network) -- the discriminator D real (tensor array) --
AttentionGAN-geo/attention_gan_model.py:105
↓ 2 callersMethodbackward_D_basic
Calculate GAN loss for the discriminator Parameters: netD (network) -- the discriminator D real (tensor array) --
models/attention_gan_model.py:99
↓ 2 callersMethodbackward_D_basic
Calculate GAN loss for the discriminator Parameters: netD (network) -- the discriminator D real (tensor array) --
models/attention_gan1_model.py:127
↓ 2 callersMethodclassification_loss
Compute binary or softmax cross entropy loss.
AttentionGAN-v1-multi/solver.py:175
↓ 2 callersMethodcompute_visuals
Calculate additional output images for visdom and HTML visualization
models/base_model.py:108
↓ 2 callersFunctioncreate_dataset
Create a dataset given the option. This function wraps the class CustomDatasetDataLoader. This is the main interface between this package
data/__init__.py:47
↓ 2 callersMethodcreate_labels
Generate target domain labels for debugging and testing.
AttentionGAN-v1-multi/solver.py:149
↓ 2 callersFunctioncreate_model
Create a model given the option. This function warps the class CustomDatasetDataLoader. This is the main interface between this package and '
models/__init__.py:54
↓ 2 callersFunctionfind_dataset_using_name
Import the module "data/[dataset_name]_dataset.py". In the file, the class called DatasetNameDataset() will be instantiated. It has to be a s
data/__init__.py:18
↓ 2 callersFunctionfind_model_using_name
Import the module "models/[model_name]_model.py". In the file, the class called DatasetNameModel() will be instantiated. It has to be a subcl
models/__init__.py:25
↓ 2 callersFunctionfrechet_classifier_distance_from_activations
Classifier distance for evaluating a generative model. This methods computes the Frechet classifier distance from activations of real imag
scripts/GAN_Metrics-Tensorflow/frechet_kernel_Inception_distance.py:84
↓ 2 callersMethodget_current_visuals
Return visualization images. train.py will display these images with visdom, and save the images to a HTML
models/base_model.py:127
↓ 2 callersFunctionget_loader
Build and return a data loader.
AttentionGAN-v1-multi/data_loader.py:71
↓ 2 callersFunctionget_norm_layer
Return a normalization layer Parameters: norm_type (str) -- the name of the normalization layer: batch | instance | none For BatchNo
AttentionGAN-geo/networks.py:19
↓ 2 callersFunctionget_norm_layer
Return a normalization layer Parameters: norm_type (str) -- the name of the normalization layer: batch | instance | none For BatchNo
models/networks.py:19
↓ 2 callersFunctionget_transform
(opt, params=None, grayscale=False, method=Image.BICUBIC, convert=True)
data/base_dataset.py:81
↓ 2 callersFunctioninit_net
Initialize a network: 1. register CPU/GPU device (with multi-GPU support); 2. initialize the network weights Parameters: net (network)
AttentionGAN-geo/networks.py:102
↓ 2 callersFunctioninit_net
Initialize a network: 1. register CPU/GPU device (with multi-GPU support); 2. initialize the network weights Parameters: net (network)
models/networks.py:102
↓ 2 callersFunctionkernel_classifier_distance_and_std_from_activations
Kernel "classifier" distance for evaluating a generative model. This methods computes the kernel classifier distance from activations of r
scripts/GAN_Metrics-Tensorflow/frechet_kernel_Inception_distance.py:167
↓ 2 callersMethodlog
(self, losses=None, images=None)
AttentionGAN-v1/utils.py:38
↓ 2 callersFunctionmkdir
create a single empty directory if it didn't exist Parameters: path (str) -- a single directory path
util/util.py:89
↓ 2 callersFunctionnormal_init
(m, mean, std)
AttentionGAN-geo/networks.py:545
↓ 2 callersFunctionnormal_init
(m, mean, std)
models/networks.py:545
↓ 2 callersMethodparse
Parse our options, create checkpoints directory suffix, and set up gpu device.
options/base_options.py:114
↓ 2 callersMethodprint_network
Print out the network information.
AttentionGAN-v1-multi/solver.py:89
↓ 2 callersMethodpush_and_pop
(self, data)
AttentionGAN-v1/utils.py:92
↓ 2 callersMethodreset_grad
Reset the gradient buffers.
AttentionGAN-v1-multi/solver.py:118
↓ 2 callersMethodrestore_model
Restore the trained generator and discriminator.
AttentionGAN-v1-multi/solver.py:98
↓ 2 callersMethodset_input
Unpack input data from the dataloader and perform necessary pre-processing steps. Parameters: input (dict): includes the data its
models/base_model.py:60
↓ 2 callersMethodsetup
Load and print networks; create schedulers Parameters: opt (Option class) -- stores all the experiment flags; needs to be a subcl
models/base_model.py:78
↓ 2 callersFunctiontensor2image
(tensor)
AttentionGAN-v1/utils.py:18
↓ 1 callersFunction__crop
(img, pos, size)
data/base_dataset.py:135
↓ 1 callersFunction__flip
(img, flip)
data/base_dataset.py:144
↓ 1 callersFunction__make_power_2
(img, base, method=Image.BICUBIC)
data/base_dataset.py:115
↓ 1 callersMethod__patch_instance_norm_state_dict
Fix InstanceNorm checkpoints incompatibility (prior to 0.4)
models/base_model.py:161
↓ 1 callersFunction__print_size_warning
Print warning information about image size(only print once)
data/base_dataset.py:150
↓ 1 callersFunction__scale_width
(img, target_width, method=Image.BICUBIC)
data/base_dataset.py:126
↓ 1 callersMethod_download_data
(self, dataset_url, save_path)
util/get_data.py:56
↓ 1 callersMethod_get_options
(r)
util/get_data.py:40
↓ 1 callersMethod_present_options
(self)
util/get_data.py:46
↓ 1 callersMethodbackward_D_A
Calculate GAN loss for discriminator D_A
AttentionGAN-geo/attention_gan_model.py:125
↓ 1 callersMethodbackward_D_A
Calculate GAN loss for discriminator D_A
models/attention_gan_model.py:119
↓ 1 callersMethodbackward_D_A
Calculate GAN loss for discriminator D_A
models/attention_gan1_model.py:147
↓ 1 callersMethodbackward_D_B
Calculate GAN loss for discriminator D_B
AttentionGAN-geo/attention_gan_model.py:130
↓ 1 callersMethodbackward_D_B
Calculate GAN loss for discriminator D_B
models/attention_gan_model.py:124
↓ 1 callersMethodbackward_D_B
Calculate GAN loss for discriminator D_B
models/attention_gan1_model.py:152
↓ 1 callersMethodbackward_G
Calculate the loss for generators G_A and G_B
AttentionGAN-geo/attention_gan_model.py:135
↓ 1 callersMethodbackward_G
Calculate the loss for generators G_A and G_B
models/attention_gan_model.py:129
↓ 1 callersMethodbackward_G
Calculate the loss for generators G_A and G_B
models/attention_gan1_model.py:157
↓ 1 callersMethodbuild_conv_block
(self, dim, norm_layer, use_dropout)
AttentionGAN-v1/models.py:63
↓ 1 callersMethodbuild_conv_block
Construct a convolutional block. Parameters: dim (int) -- the number of channels in the conv layer. padding
AttentionGAN-geo/networks.py:564
↓ 1 callersMethodbuild_conv_block
Construct a convolutional block. Parameters: dim (int) -- the number of channels in the conv layer. padding
models/networks.py:564
↓ 1 callersMethodbuild_model
Create a generator and a discriminator.
AttentionGAN-v1-multi/solver.py:72
↓ 1 callersMethodbuild_tensorboard
Build a tensorboard logger.
AttentionGAN-v1-multi/solver.py:106
↓ 1 callersMethoddisplay_current_results
Display current results on visdom; save current results to an HTML file. Parameters: visuals (OrderedDict) - - dictionary of imag
util/visualizer.py:104
↓ 1 callersMethodforward
Run forward pass; called by both functions <optimize_parameters> and <test>.
AttentionGAN-geo/attention_gan_model.py:88
↓ 1 callersMethodforward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/attention_gan_model.py:84
↓ 1 callersMethodforward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/base_model.py:69
↓ 1 callersMethodforward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/attention_gan1_model.py:110
↓ 1 callersFunctionfrechet_inception_distance
()
scripts/GAN_Metrics-Tensorflow/main.py:25
↓ 1 callersMethodgather_options
Initialize our parser with basic options(only once). Add additional model-specific and dataset-specific options. These options are def
options/base_options.py:61
↓ 1 callersMethodget_current_losses
Return traning losses / errors. train.py will print out these errors on console, and save them to a file
models/base_model.py:135
↓ 1 callersMethodget_image_dir
Return the directory that stores images
util/html.py:35
↓ 1 callersMethodget_image_paths
Return image paths that are used to load current data
models/base_model.py:112
↓ 1 callersFunctionget_inception_probs
(batch_size, images, inception_images, logits)
scripts/GAN_Metrics-Tensorflow/inception_score.py:27
↓ 1 callersFunctionget_inception_score
(batch_size, images, inception_images, logits, splits=10)
scripts/GAN_Metrics-Tensorflow/inception_score.py:45
↓ 1 callersMethodget_target_tensor
Create label tensors with the same size as the input. Parameters: prediction (tensor) - - tpyically the prediction from a discrim
AttentionGAN-geo/networks.py:244
↓ 1 callersMethodget_target_tensor
Create label tensors with the same size as the input. Parameters: prediction (tensor) - - tpyically the prediction from a discrim
models/networks.py:244
↓ 1 callersMethodgradient_penalty
Compute gradient penalty: (L2_norm(dy/dx) - 1)**2.
AttentionGAN-v1-multi/solver.py:128
↓ 1 callersFunctioninception_logits
(images, num_splits = 1)
scripts/GAN_Metrics-Tensorflow/inception_score.py:12
↓ 1 callersFunctioninception_score
()
scripts/GAN_Metrics-Tensorflow/main.py:6
↓ 1 callersFunctioninit_weights
Initialize network weights. Parameters: net (network) -- network to be initialized init_type (str) -- the name of an initializa
AttentionGAN-geo/networks.py:68
next →1–100 of 242, ranked by callers