MCPcopy Create free account

hub / github.com/VITA-Group/GAN-Slimming / functions

Functions68 in github.com/VITA-Group/GAN-Slimming

↓ 28 callersMethodappend
(self, val)
utils/utils.py:22
↓ 10 callersMethodstep
(self, epoch)
utils/utils.py:187
↓ 6 callersFunctioncreate_dir
(_path)
utils/utils.py:291
↓ 4 callersMethod__init__
Build pretrained InceptionV3 Parameters ---------- output_blocks : list of int Indices of blocks to return featur
utils/inception.py:31
↓ 4 callersMethod__init__
Args: dim_lst: channel dimensions. [int] alpha: channel width factor. float.
models/models.py:135
↓ 4 callersMethodbackward
In the backward pass we receive a Tensor containing the gradient of the loss with respect to the output, and we need to compute the g
models/models.py:32
↓ 2 callersFunction_compute_statistics_of_path
(path, model, batch_size, dims, cuda)
utils/fid_score.py:235
↓ 2 callersFunctioncalculate_fid_given_paths
Calculates the FID of two paths Args: paths: tuple/list. len = 2. paths[0]: path for generated images. path[1]: path
utils/fid_score.py:249
↓ 2 callersFunctionfourD2threeD
Convert a batch of images (N,W,H,C) to a single big image (W*n, H*m, C) Input: batch: type=ndarray, shape=(N,W,H,C) Return: rows: type=ndarray
utils/utils.py:295
↓ 2 callersFunctiongram_matrix
(y)
utils/perceptual.py:18
↓ 2 callersFunctionperceptual_loss
Calculate perceptual loss based on two vgg features. Agrs: vgg_features1, vgg_features2: vgg features. Output: loss_pe
utils/perceptual.py:26
↓ 2 callersMethodpush_and_pop
(self, data)
utils/utils.py:164
↓ 1 callersFunctioncalculate_activation_statistics
Calculation of the statistics used by the FID. Params: -- files : List of image files paths -- model : Instance of inception m
utils/fid_score.py:210
↓ 1 callersFunctioncalculate_frechet_distance
Numpy implementation of the Frechet Distance. The Frechet distance between two multivariate Gaussians X_1 ~ N(mu_1, C_1) and X_2 ~ N(mu_2, C_2
utils/fid_score.py:153
↓ 1 callersMethodconv2d_forward
(self, input, weight)
models/models.py:55
↓ 1 callersFunctionfid_inception_v3
Build pretrained Inception model for FID computation The Inception model for FID computation uses a different set of weights and has a slight
utils/inception.py:166
↓ 1 callersFunctionget_activations
Calculates the activations of the pool_3 layer for all images. Params: -- files : List of image files paths -- model : Instan
utils/fid_score.py:75
↓ 1 callersFunctionlayer_param_num
(model, param_name=['weight'])
utils/utils.py:315
↓ 1 callersFunctionload_ckpt
(netG, netD, optimizer_G, optimizer_D, optimizer_gamma, lr_scheduler_G, lr_scheduler_D, lr_scheduler_gamma
utils/utils.py:68
↓ 1 callersFunctionload_ckpt_finetune
(netG, netD, optimizer_G, optimizer_D, lr_scheduler_G, lr_scheduler_D, path)
utils/utils.py:119
↓ 1 callersFunctionmeasure_model
(net, H_in, W_in)
utils/utils.py:225
↓ 1 callersFunctionmodel_param_num
Find parameter numbers in the model. in Million.
utils/utils.py:326
↓ 1 callersFunctionnone_zero_channel_num
(model, model_path=None)
utils/utils.py:269
↓ 1 callersMethodreset
(self)
utils/utils.py:18
↓ 1 callersFunctionsave_ckpt
(epoch, netG, netD, optimizer_G, optimizer_D, optimizer_gamma, lr_scheduler_G, lr_scheduler_D, lr_schedule
utils/utils.py:44
↓ 1 callersFunctionsave_ckpt_finetune
(epoch, netG, netD, optimizer_G, optimizer_D, lr_scheduler_G, lr_scheduler_D, loss_G_lst, loss_G_perceptu
utils/utils.py:96
↓ 1 callersFunctionsave_training_set_stat
(path)
utils/fid_score.py:290
↓ 1 callersFunctionsoft_threshold
pytorch soft-sign function
utils/utils.py:200
↓ 1 callersFunctiontqdm
(x)
utils/fid_score.py:52
Method__call__
(self,x)
utils/perceptual.py:13
Method__getitem__
(self, index)
datasets/datasets.py:21
Method__getitem__
(self, index)
datasets/datasets.py:56
Method__init__
(self)
utils/utils.py:15
Method__init__
(self, max_size=50)
utils/utils.py:159
Method__init__
(self, n_epochs, offset, decay_start_epoch)
utils/utils.py:181
Method__init__
(self)
utils/perceptual.py:10
Method__init__
(self, requires_grad=False)
utils/vgg.py:12
Method__init__
(self, in_channels, pool_features)
utils/inception.py:195
Method__init__
(self, in_channels, channels_7x7)
utils/inception.py:220
Method__init__
(self, in_channels)
utils/inception.py:248
Method__init__
(self, in_channels)
utils/inception.py:281
Method__init__
Construct a dataset with all images from a dir. dataset_dir: str. img folder path
datasets/datasets.py:10
Method__init__
Construct a dataset with all images from a dir. dataset: str. dataset name style: str. 'A2B' or 'B2A'
datasets/datasets.py:33
Method__init__
(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1,
models/models.py:44
Method__init__
(self, in_channels, out_channels, kernel_size, stride=1, padding=0, output_padding=0, groups=
models/models.py:80
Method__init__
(self, in_features=256, mid_features=256, conv_class=nn.Conv2d)
models/models.py:115
Method__init__
(self, input_nc)
models/models.py:202
Method__len__
(self)
datasets/datasets.py:28
Method__len__
(self)
datasets/datasets.py:72
Methodavg
(self)
utils/utils.py:31
Methodforward
(self, X)
utils/vgg.py:31
Methodforward
Get Inception feature maps Parameters ---------- inp : torch.autograd.Variable Input tensor of shape Bx3xHxW. Val
utils/inception.py:129
Methodforward
(self, x)
utils/inception.py:198
Methodforward
(self, x)
utils/inception.py:223
Methodforward
(self, x)
utils/inception.py:251
Methodforward
(self, x)
utils/inception.py:284
Methodforward
In the forward pass we apply the quantizer
models/models.py:18
Methodforward
(self, input)
models/models.py:65
Methodforward
(self, input, output_size=None)
models/models.py:91
Methodforward
(self, x)
models/models.py:131
Methodforward
(self, x)
models/models.py:198
Methodforward
(self, x)
models/models.py:226
Functionget_feature_hook
(self, _input, _output)
utils/utils.py:213
Methodlast_avg
(self)
utils/utils.py:35
Functionshow_sparsity
(model, save_name, model_path=None)
utils/utils.py:242
Functiontensor2image
(tensor)
utils/utils.py:147
Methodval
(self)
utils/utils.py:27
Functionweights_init_normal
(m)
utils/utils.py:190