Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SonyCSLParis/Comparing-Representations-for-Audio-Synthesis-using-GANs
/ functions
Functions
319 in github.com/SonyCSLParis/Comparing-Representations-for-Audio-Synthesis-using-GANs
⨍
Functions
319
◇
Types & classes
49
↓ 30 callers
Function
mkdir_in_path
(path, dirname)
utils/utils.py:17
↓ 20 callers
Method
__init__
(self)
pg_gan/custom_layers.py:184
↓ 15 callers
Method
buildNoiseData
r""" Build a batch of latent vectors for the generator. Args: n_samples (int): number of vector in the batch
pg_gan/base_GAN.py:364
↓ 14 callers
Method
load
r""" Load a model saved with the @method save() function Args: - path (string): file where the model is stored
pg_gan/base_GAN.py:496
↓ 13 callers
Method
getOriginalG
r""" Retrieve the original G network. Use this function when you want to modify G after the initialization
pg_gan/base_GAN.py:402
↓ 10 callers
Function
GPU_is_available
()
utils/utils.py:384
↓ 10 callers
Method
getCriterion
(self, input, status)
pg_gan/base_loss_criterions.py:44
↓ 9 callers
Function
_sqn
(arr)
evaluation/metrics/kernel_inception_distance.py:40
↓ 9 callers
Function
list_files_abs_path
(dir_path, format='.wav')
utils/utils.py:35
↓ 9 callers
Method
test
r""" Generate some data given the input latent vector. Args: input (torch.tensor): input latent vector
pg_gan/base_GAN.py:156
↓ 8 callers
Method
getOriginalD
r""" Retrieve the original D network. Use this function when you want to modify D after the initialization
pg_gan/base_GAN.py:411
↓ 7 callers
Method
_add_audio_loader
(self)
data/preprocessing.py:302
↓ 7 callers
Method
_add_fade_out
(self)
data/preprocessing.py:314
↓ 7 callers
Method
_add_norm
(self)
data/preprocessing.py:320
↓ 7 callers
Method
_add_signal_zeropadding
(self)
data/preprocessing.py:327
↓ 7 callers
Method
classificationPenalty
r""" Compute the classification penalty associated with the current output Args: - outputD (tensor): discriminato
pg_gan/base_GAN.py:581
↓ 7 callers
Function
parse_state_name
r""" Parse a file name with the given pattern: pattern = ($model_name)_s($scale)_i($iteration).pt Returns: None if the path doesn't fulfi
utils/utils.py:138
↓ 7 callers
Method
reshape
(x)
data/preprocessing.py:159
↓ 6 callers
Function
finiteCheck
(parameters)
utils/utils.py:87
↓ 5 callers
Method
_init_stft_params
(self)
data/preprocessing.py:339
↓ 5 callers
Function
checkexists_mkdir
(path)
utils/utils.py:10
↓ 5 callers
Method
get_preprocessor
(self, compose=True)
data/preprocessing.py:51
↓ 5 callers
Function
load_model_checkp
(dir, iteration=None, scale=None, **kwargs)
utils/utils.py:390
↓ 5 callers
Method
load_state_dict
r""" Load a model saved with the @method save() function Args: - in_state (dict): state dict containing the model
pg_gan/base_GAN.py:517
↓ 5 callers
Method
setNewAlpha
r""" Update the value of the merging factor alpha Args: - alpha (float): merging factor, must be in [0, 1]
pg_gan/progressive_conv_net.py:184
↓ 4 callers
Method
get_postprocessor
(self, compose=True)
data/preprocessing.py:55
↓ 4 callers
Function
loadStateDictCompatible
r""" Load the input state dict to the module except for the weights corresponding to one of the forbidden layers
utils/utils.py:304
↓ 4 callers
Method
save
r""" Save the model at the given location. All parameters included in the self.config class will be saved as well. Args:
pg_gan/base_GAN.py:470
↓ 4 callers
Method
updateSolversDevice
r""" Move the current networks and solvers to the GPU. This function must be called each time netG or netD is modified
pg_gan/base_GAN.py:341
↓ 3 callers
Function
WGANGPGradientPenalty
r""" Gradient penalty as described in "Improved Training of Wasserstein GANs" https://arxiv.org/pdf/1704.00028.pdf Args: - i
pg_gan/gradient_losses.py:3
↓ 3 callers
Method
__init__
(self, device)
pg_gan/base_loss_criterions.py:38
↓ 3 callers
Method
_add_ifreq
(self)
data/preprocessing.py:381
↓ 3 callers
Method
_add_log_mag
(self)
data/preprocessing.py:375
↓ 3 callers
Method
_add_mag_phase
(self)
data/preprocessing.py:362
↓ 3 callers
Method
addScale
r""" Add a new scale to the model. Increasing the output resolution by a factor 2 Args: - depthNewScale (int): de
pg_gan/progressive_conv_net.py:152
↓ 3 callers
Method
buildAvG
r""" Create and upload a moving average generator.
pg_gan/base_GAN.py:174
↓ 3 callers
Function
compute_kernel
(x, y, k)
evaluation/metrics/maximum_mean_discrepancy.py:3
↓ 3 callers
Method
getInputDim
r""" Size of the latent vector given by self.buildRandomCriterionTensor
pg_gan/ac_criterion.py:167
↓ 3 callers
Function
read_json
(path)
utils/utils.py:22
↓ 3 callers
Function
saveAudioBatch
(data, path, basename, sr=16000, overwrite=False)
utils/utils.py:466
↓ 3 callers
Method
upscale
(self, x, size)
pg_gan/progressive_conv_net.py:202
↓ 2 callers
Method
__init__
(self, data_path, output_path, size, _form
data/nsynth.py:23
↓ 2 callers
Method
_add_rm_dc
(self)
data/preprocessing.py:369
↓ 2 callers
Method
_add_stft
(self)
data/preprocessing.py:347
↓ 2 callers
Function
buildKeyOrder
r""" If the dataset is labelled, give the order in which the attributes are given Args: - shiftAttrib (dict): order of each category
data/db_stats.py:27
↓ 2 callers
Method
downScale
(self, x, size=0)
pg_gan/progressive_conv_net.py:420
↓ 2 callers
Function
filter_keys_in_strings
(strings, keys)
utils/utils.py:38
↓ 2 callers
Method
getDefaultConfig
(self)
pg_gan/gan_trainer.py:244
↓ 2 callers
Method
getKeyOrders
r""" If the dataset is labelled, give the order in which the attributes are given Returns: A dictionary output[k
data/nsynth.py:310
↓ 2 callers
Function
getLastCheckPoint
r""" Get the last checkpoint of the model with name @param name detected in the directory (@param dir) Returns: trainConfig, pathMode
utils/utils.py:184
↓ 2 callers
Method
getMiniBatchSize
(self, scale)
pg_gan/gan_trainer.py:308
↓ 2 callers
Method
getNetD
r""" The discrimator should be defined here.
pg_gan/base_GAN.py:426
↓ 2 callers
Method
getNetG
r""" The generator should be defined here.
pg_gan/base_GAN.py:420
↓ 2 callers
Method
getScore
(self, eps=1e-06)
evaluation/metrics/inception_score.py:31
↓ 2 callers
Function
get_filename
(abs_path)
utils/utils.py:41
↓ 2 callers
Method
initDecisionLayer
(self, sizeDecisionLayer)
pg_gan/progressive_conv_net.py:413
↓ 2 callers
Method
initFormatLayer
r""" The format layer represents the first weights applied to the latent vector. It converts a 1xdimLatent input into a 4 x 4 x scales
pg_gan/progressive_conv_net.py:100
↓ 2 callers
Method
initModel
r""" Initialize the GAN model.
pg_gan/gan_trainer.py:130
↓ 2 callers
Method
initializeClassificationCriterion
r""" For labelled datasets: initialize the classification criterion.
pg_gan/base_GAN.py:307
↓ 2 callers
Function
interpolate_batch
(x, y, steps)
evaluation/gen_tests/from_midi.py:15
↓ 2 callers
Function
loadPartOfStateDict
r""" Load the input state dict to the module except for the weights corresponding to one of the forbidden layers
utils/utils.py:286
↓ 2 callers
Function
mag_to_complex
(x)
data/audio_transforms.py:82
↓ 2 callers
Function
mmd
(z_tilde, z, kernel='imq')
evaluation/metrics/maximum_mean_discrepancy.py:13
↓ 2 callers
Function
num_flat_features
(x)
utils/utils.py:249
↓ 2 callers
Method
optimizeParameters
r""" Update the discrimator D using the given "real" inputs. Args: input (torch.tensor): input batch of real data
pg_gan/base_GAN.py:186
↓ 2 callers
Method
readTrainConfig
r""" Load a permanent configuration describing a models. The variables described in this file are constant through the training.
pg_gan/gan_trainer.py:171
↓ 2 callers
Method
register_G_grads
(self)
pg_gan/base_GAN.py:640
↓ 2 callers
Method
resetRunningLosses
(self)
pg_gan/gan_trainer.py:145
↓ 2 callers
Function
safe_exp
(x)
data/audio_transforms.py:113
↓ 2 callers
Function
safe_log
(x)
data/audio_transforms.py:87
↓ 2 callers
Method
scaleSanityCheck
(self)
pg_gan/progressive_gan_trainer.py:120
↓ 2 callers
Method
set_transform
(self, transform)
data/nsynth.py:122
↓ 2 callers
Method
train
r""" Launch the training. This one will stop if a divergent behavior is detected. Returns: - True if the trainin
pg_gan/progressive_gan_trainer.py:217
↓ 2 callers
Method
updateAlphaJumps
r""" Given the number of iterations between two updates of alpha at each scale and the number of updates per scale, build the effectiv
pg_gan/progressive_gan_trainer.py:140
↓ 2 callers
Function
updateConfig
r""" Update a configuration with the fields of another given configuration
utils/config.py:41
↓ 2 callers
Method
updateWithMiniBatch
(self, ref)
evaluation/metrics/inception_score.py:15
↓ 1 callers
Method
__init__
Creates a data manager @arg
data/preprocessing.py:28
↓ 1 callers
Method
__init__
r""" Build a generator for a progressive GAN model Args: - dimLatent (int): dimension of the latent vector -
pg_gan/progressive_conv_net.py:13
↓ 1 callers
Method
_complex_to_lin
(self)
data/preprocessing.py:323
↓ 1 callers
Function
_mmd2_and_variance
(K_XX, K_XY, K_YY, unit_diagonal=False, mmd_est='unbiased', block_size=1024,
evaluation/metrics/kernel_inception_distance.py:45
↓ 1 callers
Method
addScale
(self, depthNewScale)
pg_gan/progressive_conv_net.py:368
↓ 1 callers
Method
addStartingScales
r""" If a starting scale is defined other than 0, this method adds to the network the first 0-startingScale blocks.
pg_gan/progressive_gan_trainer.py:206
↓ 1 callers
Method
buildLatentCriterion
(self, targetCat, skipAtts=False)
pg_gan/ac_criterion.py:145
↓ 1 callers
Method
buildRandomCriterionTensor
r""" Build a batch of vectors with a random combination of the values of the existing classes Args: sizeBatch (in
pg_gan/ac_criterion.py:108
↓ 1 callers
Method
count_attributes
(self)
data/nsynth.py:220
↓ 1 callers
Method
filter_files
(self)
data/nsynth.py:133
↓ 1 callers
Function
filter_files_in_path
(dir_path, format='.wav')
utils/utils.py:32
↓ 1 callers
Method
generateConstraintsFromVector
(self, n, labels)
pg_gan/ac_criterion.py:86
↓ 1 callers
Function
getClassStats
(inputDict, className)
data/db_stats.py:1
↓ 1 callers
Function
getConfigFromDict
r""" Using a new configuration dictionary and a default configuration setup an object with the given configuration. for example, if you h
utils/config.py:13
↓ 1 callers
Function
getConfigOverrideFromParser
(parsedArgs, defaultConfig)
utils/config.py:84
↓ 1 callers
Method
getDBLoader
r""" Load the training dataset for the given scale. Args: - scale (int): scale at which we are working Returns:
pg_gan/gan_trainer.py:319
↓ 1 callers
Method
getDataset
(self)
pg_gan/gan_trainer.py:341
↓ 1 callers
Function
getDictFromConfig
r""" Retrieve all the members of obj which are also members of referenceConfig and dump them into a dictionnary If printDefault is activa
utils/config.py:97
↓ 1 callers
Function
getLayerNormalizationFactor
r""" Get He's constant for the given layer https://www.cv-foundation.org/openaccess/content_iccv_2015/papers/He_Delving_Deep_into_ICCV_2015_pa
pg_gan/custom_layers.py:38
↓ 1 callers
Function
getMinOccurence
(inputDict, value, default)
utils/utils.py:109
↓ 1 callers
Method
getOptimizerD
r""" Optimizer of the discriminator.
pg_gan/base_GAN.py:432
↓ 1 callers
Method
getOptimizerG
r""" Optimizer of the generator.
pg_gan/base_GAN.py:438
↓ 1 callers
Method
getOutputSize
r""" Get the size of the generated image.
pg_gan/progressive_conv_net.py:139
↓ 1 callers
Method
getStateDict
r""" Get the model's parameters
pg_gan/base_GAN.py:444
next →
1–100 of 319, ranked by callers