Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Ha0Tang/AttentionGAN
/ functions
Functions
242 in github.com/Ha0Tang/AttentionGAN
⨍
Functions
242
◇
Types & classes
48
↓ 1 callers
Function
init_weights
Initialize network weights. Parameters: net (network) -- network to be initialized init_type (str) -- the name of an initializa
models/networks.py:68
↓ 1 callers
Method
initialize
Define the common options that are used in both training and test.
options/base_options.py:20
↓ 1 callers
Function
is_image_file
(filename)
data/image_folder.py:19
↓ 1 callers
Function
kernel_inception_distance
()
scripts/GAN_Metrics-Tensorflow/main.py:50
↓ 1 callers
Method
load_data
(self)
data/__init__.py:81
↓ 1 callers
Method
load_networks
Load all the networks from the disk. Parameters: epoch (int) -- current epoch; used in the file name '%s_net_%s.pth' % (epoch, na
models/base_model.py:175
↓ 1 callers
Function
main
(config)
AttentionGAN-v1-multi/main.py:11
↓ 1 callers
Method
optimize_parameters
Calculate losses, gradients, and update network weights; called in every training iteration
models/base_model.py:74
↓ 1 callers
Method
plot_current_losses
display the current losses on visdom display: dictionary of error labels and values Parameters: epoch (int) -- current
util/visualizer.py:185
↓ 1 callers
Function
preds2score
(preds, splits=10)
scripts/GAN_Metrics-Tensorflow/inception_score.py:36
↓ 1 callers
Method
preprocess
Preprocess the CelebA attribute file.
AttentionGAN-v1-multi/data_loader.py:31
↓ 1 callers
Method
print_current_losses
print current losses on console; also save the losses to the disk Parameters: epoch (int) -- current epoch iters (int
util/visualizer.py:211
↓ 1 callers
Method
print_networks
Print the total number of parameters in the network and (if verbose) network architecture Parameters: verbose (bool) -- if verbos
models/base_model.py:200
↓ 1 callers
Method
print_options
Print and save options It will print both current options and default values(if different). It will save options into a text file / [
options/base_options.py:89
↓ 1 callers
Method
reset
Reset the self.saved status
util/visualizer.py:93
↓ 1 callers
Function
save_images
Save images to the disk. Parameters: webpage (the HTML class) -- the HTML webpage class that stores these imaegs (see html.py for more de
util/visualizer.py:16
↓ 1 callers
Method
scalar_summary
Add scalar summary.
AttentionGAN-v1-multi/logger.py:11
↓ 1 callers
Method
test
Translate images using StarGAN trained on a single dataset.
AttentionGAN-v1-multi/solver.py:536
↓ 1 callers
Method
test
Forward function used in test time. This function wraps <forward> function in no_grad() so we don't save intermediate steps for backprop
models/base_model.py:98
↓ 1 callers
Function
trace_sqrt_product
Find the trace of the positive sqrt of product of covariance matrices. '_symmetric_matrix_square_root' only works for symmetric matrices, so we
scripts/GAN_Metrics-Tensorflow/frechet_kernel_Inception_distance.py:43
↓ 1 callers
Method
train
Train StarGAN within a single dataset.
AttentionGAN-v1-multi/solver.py:182
↓ 1 callers
Method
update_learning_rate
Update learning rates for all the networks; called at the end of every epoch
models/base_model.py:116
↓ 1 callers
Method
update_lr
Decay learning rates of the generator and discriminator.
AttentionGAN-v1-multi/solver.py:111
↓ 1 callers
Method
weight_init
(self, mean, std)
AttentionGAN-geo/networks.py:533
↓ 1 callers
Method
weight_init
(self, mean, std)
models/networks.py:533
Method
__call__
Calculate loss given Discriminator's output and grount truth labels. Parameters: prediction (tensor) - - tpyically the prediction
AttentionGAN-geo/networks.py:261
Method
__call__
Calculate loss given Discriminator's output and grount truth labels. Parameters: prediction (tensor) - - tpyically the prediction
models/networks.py:261
Method
__getitem__
(self, index)
AttentionGAN-v1/datasets.py:17
Method
__getitem__
Return a data point and its metadata information. Parameters: index - - a random integer for data indexing Returns:
data/base_dataset.py:51
Method
__getitem__
Return a data point and its metadata information. Parameters: index (int) -- a random integer for data indexing Ret
data/unaligned_dataset.py:39
Method
__getitem__
(self, index)
data/image_folder.py:55
Method
__getitem__
Return one image and its corresponding attribute label.
AttentionGAN-v1-multi/data_loader.py:59
Method
__init__
(self, n_epochs, batches_epoch)
AttentionGAN-v1/utils.py:25
Method
__init__
(self, max_size=50)
AttentionGAN-v1/utils.py:87
Method
__init__
(self, n_epochs, offset, decay_start_epoch)
AttentionGAN-v1/utils.py:109
Method
__init__
(self, dim, norm_layer, use_dropout)
AttentionGAN-v1/models.py:59
Method
__init__
(self)
AttentionGAN-v1/models.py:83
Method
__init__
(self, root, transforms_=None, unaligned=False, mode='train')
AttentionGAN-v1/datasets.py:10
Method
__init__
Initialize the class; save the options in the class Parameters: opt (Option class)-- stores all the experiment flags; needs to be
data/base_dataset.py:23
Method
__init__
Initialize this class Step 1: create a dataset instance given the name [dataset_mode] Step 2: create a multi-threaded data loader.
data/__init__.py:65
Method
__init__
Initialize this dataset class. Parameters: opt (Option class) -- stores all the experiment flags; needs to be a subclass of BaseO
data/unaligned_dataset.py:19
Method
__init__
(self, root, transform=None, return_paths=False, loader=default_loader)
data/image_folder.py:41
Method
__init__
Reset the class; indicates the class hasn't been initailized
options/base_options.py:16
Method
__init__
Initialize configurations.
AttentionGAN-v1-multi/solver.py:16
Method
__init__
Initialize summary writer.
AttentionGAN-v1-multi/logger.py:7
Method
__init__
Initialize and preprocess the CelebA dataset.
AttentionGAN-v1-multi/data_loader.py:13
Method
__init__
(self, dim_in, dim_out)
AttentionGAN-v1-multi/model.py:9
Method
__init__
(self, image_size=128, conv_dim=64, c_dim=5, repeat_num=6)
AttentionGAN-v1-multi/model.py:76
Method
__init__
Initialize the CycleGAN class. Parameters: opt (Option class)-- stores all the experiment flags; needs to be a subclass of BaseOpt
AttentionGAN-geo/attention_gan_model.py:19
Method
__init__
Construct a Resnet-based generator Parameters: input_nc (int) -- the number of channels in input images output_n
AttentionGAN-geo/networks.py:325
Method
__init__
(self, input_nc, output_nc, ngf=64, n_blocks=9)
AttentionGAN-geo/networks.py:381
Method
__init__
(self, channel, kernel, stride, padding)
AttentionGAN-geo/networks.py:521
Method
__init__
Initialize the Resnet block A resnet block is a conv block with skip connections We construct a conv block with build_conv_block func
AttentionGAN-geo/networks.py:553
Method
__init__
Construct a Unet generator Parameters: input_nc (int) -- the number of channels in input images output_nc (int) -- th
AttentionGAN-geo/networks.py:613
Method
__init__
Construct a Unet submodule with skip connections. Parameters: outer_nc (int) -- the number of filters in the outer conv layer
AttentionGAN-geo/networks.py:648
Method
__init__
Construct a PatchGAN discriminator Parameters: input_nc (int) -- the number of channels in input images ndf (int)
AttentionGAN-geo/networks.py:715
Method
__init__
Construct a 1x1 PatchGAN discriminator Parameters: input_nc (int) -- the number of channels in input images ndf (int
AttentionGAN-geo/networks.py:763
Method
__init__
(self, opt)
models/attention_gan_model.py:19
Method
__init__
Initialize the BaseModel class. Parameters: opt (Option class)-- stores all the experiment flags; needs to be a subclass of BaseO
models/base_model.py:18
Method
__init__
Initialize the CycleGAN class. Parameters: opt (Option class)-- stores all the experiment flags; needs to be a subclass of BaseOpt
models/attention_gan1_model.py:42
Method
__init__
Construct a Resnet-based generator Parameters: input_nc (int) -- the number of channels in input images output_n
models/networks.py:325
Method
__init__
(self, input_nc, output_nc, ngf=64, n_blocks=9)
models/networks.py:381
Method
__init__
(self, channel, kernel, stride, padding)
models/networks.py:521
Method
__init__
Initialize the Resnet block A resnet block is a conv block with skip connections We construct a conv block with build_conv_block func
models/networks.py:553
Method
__init__
Construct a Unet generator Parameters: input_nc (int) -- the number of channels in input images output_nc (int) -- th
models/networks.py:613
Method
__init__
Construct a Unet submodule with skip connections. Parameters: outer_nc (int) -- the number of filters in the outer conv layer
models/networks.py:648
Method
__init__
Construct a PatchGAN discriminator Parameters: input_nc (int) -- the number of channels in input images ndf (int)
models/networks.py:715
Method
__init__
Construct a 1x1 PatchGAN discriminator Parameters: input_nc (int) -- the number of channels in input images ndf (int
models/networks.py:763
Method
__init__
(self, technique='cyclegan', verbose=True)
util/get_data.py:27
Method
__init__
Initialize the HTML classes Parameters: web_dir (str) -- a directory that stores the webpage. HTML file will be created at <web_d
util/html.py:14
Method
__init__
Initialize the Visualizer class Parameters: opt -- stores all the experiment flags; needs to be a subclass of BaseOptions
util/visualizer.py:58
Method
__init__
Initialize the ImagePool class Parameters: pool_size (int) -- the size of image buffer, if pool_size=0, no buffer will be created
util/image_pool.py:12
Method
__iter__
Return a batch of data
data/__init__.py:88
Method
__len__
(self)
AttentionGAN-v1/datasets.py:27
Method
__len__
Return the total number of images in the dataset.
data/base_dataset.py:46
Method
__len__
Return the number of data in the dataset
data/__init__.py:84
Method
__len__
Return the total number of images in the dataset. As we have two datasets with potentially different number of images, we take a maxi
data/unaligned_dataset.py:65
Method
__len__
(self)
data/image_folder.py:65
Method
__len__
Return the number of images.
AttentionGAN-v1-multi/data_loader.py:66
Function
cal_gradient_penalty
Calculate the gradient penalty loss, used in WGAN-GP paper https://arxiv.org/abs/1704.00028 Arguments: netD (network) -- dis
AttentionGAN-geo/networks.py:282
Function
cal_gradient_penalty
Calculate the gradient penalty loss, used in WGAN-GP paper https://arxiv.org/abs/1704.00028 Arguments: netD (network) -- dis
models/networks.py:282
Function
compute_kid_block
Compute the ith block of the KID estimate.
scripts/GAN_Metrics-Tensorflow/frechet_kernel_Inception_distance.py:269
Function
default_loader
(path)
data/image_folder.py:35
Function
define_D
Create a discriminator Parameters: input_nc (int) -- the number of channels in input images ndf (int) -- the number
AttentionGAN-geo/networks.py:166
Function
define_D
Create a discriminator Parameters: input_nc (int) -- the number of channels in input images ndf (int) -- the number
models/networks.py:166
Function
define_G
Create a generator Parameters: input_nc (int) -- the number of channels in input images output_nc (int) -- the number of channels
AttentionGAN-geo/networks.py:121
Function
define_G
Create a generator Parameters: input_nc (int) -- the number of channels in input images output_nc (int) -- the number of channels
models/networks.py:121
Function
diagnose_network
Calculate and print the mean of average absolute(gradients) Parameters: net (torch network) -- Torch network name (str) -- the na
util/util.py:30
Method
forward
(self, x)
AttentionGAN-v1/models.py:77
Method
forward
(self, img)
AttentionGAN-v1/models.py:104
Method
forward
(self, x)
AttentionGAN-v1-multi/model.py:18
Method
forward
(self, x, c)
AttentionGAN-v1-multi/model.py:55
Method
forward
(self, x)
AttentionGAN-v1-multi/model.py:93
Method
forward
(self, x)
AttentionGAN-geo/networks.py:15
Method
forward
Standard forward
AttentionGAN-geo/networks.py:375
Method
forward
(self, input)
AttentionGAN-geo/networks.py:439
Method
forward
(self, input)
AttentionGAN-geo/networks.py:537
Method
forward
Forward function (with skip connections)
AttentionGAN-geo/networks.py:604
Method
forward
Standard forward
AttentionGAN-geo/networks.py:637
Method
forward
(self, x)
AttentionGAN-geo/networks.py:705
← previous
next →
101–200 of 242, ranked by callers