MCPcopy Create free account

hub / github.com/RF5/simple-asgan / functions

Functions83 in github.com/RF5/simple-asgan

↓ 9 callersMethod__init__
(self, z_dim, c_dim, n_layers=3, leaky_alpha=0.1, equalized_lr=False, equalized_lr_mult=0.01)
density/models.py:15
↓ 4 callersMethodget_feats_batched
Batched inference of embeddings. `x` is a waveform of shape (bs, T)
hubert_feature_reader.py:85
↓ 4 callersMethodlpf
critical down_factor LPF of `c` of shape (bs, channels, seq_len)
density/models.py:602
↓ 3 callersMethod__getitem__
(self, index)
density/dataset.py:59
↓ 3 callersFunctionfix
(blah)
density/config.py:10
↓ 3 callersMethodprep_fad_metrics
(self, hubert=None, hifigan=None)
density/dataset.py:83
↓ 2 callersMethod__init__
(self, c_dim, seq_len, data_type='hubert_L6', pad_type='tile')
density/dataset.py:147
↓ 2 callersMethodclear
(self)
density/metrics.py:35
↓ 2 callersMethoddown
Downsampling: apply LPF and only keep every `down_factor` input `c` of shape (bs, channels, seq_len).
density/models.py:590
↓ 2 callersFunctionlogistic_d_loss
Logistic discriminator loss. `d_real_outputs` (bs,): D(x), or in our case D(c) `d_generated_outputs` (bs,): D(G(x)), or in our case D(W(z
density/losses.py:18
↓ 2 callersFunctionlogistic_g_loss
Logistic generator loss. Assumes input is D(G(x)), or in our case, D(W(z)). `disc_outputs` of shape (bs,)
density/losses.py:7
↓ 1 callersFunction_two_proportions_z_test
(p1, n1, p2, n2, significance_level, z_threshold=None)
metrics.py:48
↓ 1 callersMethodaccumulate
`c_real` and `c_fake` of shape (bs, dim)
density/metrics.py:21
↓ 1 callersMethodaccumulate
Homebrew ADA accumulation
density/augment.py:82
↓ 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
metrics.py:136
↓ 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
density/metrics.py:98
↓ 1 callersFunctionclosest_dist_pair
(c_real, c_fake, n1=1000, n2=1000)
density/metrics.py:56
↓ 1 callersFunctiondist_heuristic_loss
(c_real: Tensor, c_fake: Tensor, n)
density/losses.py:35
↓ 1 callersFunctionfad
(c_f, mu_real, cov_real)
density/metrics.py:92
↓ 1 callersMethodforward
Assumes `z` of shape (bs, z_dim)
density/models.py:43
↓ 1 callersMethodforward_w
(self, w: Tensor, seq_len:int, update_ema=False)
density/models.py:140
↓ 1 callersFunctionhubert_hifigan
HiFiGAN which works on HuBERT embeddings. Optionally specify `model_dir` as location of hubert checkpoint.
hubconf.py:109
↓ 1 callersFunctionmain
()
split_data.py:9
↓ 1 callersFunctionmain
()
train_asgan.py:507
↓ 1 callersFunctionmake_grad_norm_fig
(g: nn.Module, d: nn.Module)
density/metrics.py:157
↓ 1 callersMethodmake_plot
(self)
density/metrics.py:39
↓ 1 callersFunctionmelspec2hubert
(cs: Tensor, hubert, hifigan, bs=32, mb=None)
density/augment.py:103
↓ 1 callersMethodmetric
(self)
density/metrics.py:30
↓ 1 callersFunctionperc_closest
Find % of `closest_n` that belong to `real` or `fake` (bs, c_dim) cs
density/metrics.py:66
↓ 1 callersFunctionplot_melspecs
`c_fake` (bs, seq_len, c_dim)
density/metrics.py:184
↓ 1 callersFunctionr1_reg
(d_real_outputs: Tensor, c_real: Tensor, r1_gamma)
density/losses.py:55
↓ 1 callersMethodread_audio
Reads in audio from `path` using soundfile. Optionally ensure audio is of length `ref_len` samples.
hubert_feature_reader.py:39
↓ 1 callersMethodskip_d_update
(self)
density/augment.py:69
↓ 1 callersFunctiontrain
(rank, cfg: TrainConfig)
train_asgan.py:33
↓ 1 callersMethodup
Upsampling: inserts zeros and convolves with LPF (interpolation filter) `c` of shape (bs, channels, seq_len)
density/models.py:574
Method__call__
(self, xs)
density/dataset.py:165
Method__call__
`c` is of shape (bs, seq_len, c_dim)
density/augment.py:27
Method__init__
Instantiate a hubert feature reader from checkpoint file at `checkpoint_path`, setup to extract features from `layer` of the model. Optionally
hubert_feature_reader.py:17
Method__init__
Inference wrapper for generator `g` and `hifigan` vocoder for the conv2 series of models which predict a sequence of hubert vectors, which i
hubconf.py:20
Method__init__
(self, cfg)
density/models.py:65
Method__init__
(self, c_in, c_out, w_dim, kernel_size=3, lrelu_coeff=0.1, ema_weight=0.001, normalize=True, u
density/models.py:171
Method__init__
sr=50 for hubert features, as they are every 20ms <-> 50Hz
density/models.py:272
Method__init__
(self, group_size=4, num_channels=1)
density/models.py:331
Method__init__
(self, c_dim, d_dim, seq_len, lrelu_coeff, kernel_size=3, block_repeats=[3, 3, 3, 3],
density/models.py:355
Method__init__
(self, in_channels, out_channels, lrelu_coeff, kernel_size=3, down_factor=2, clamp=256, equalized_lr=False)
density/models.py:419
Method__init__
(self, in_channels, # Number of input channels. head_seq_len,
density/models.py:482
Method__init__
M must be a power of 2.
density/models.py:532
Method__init__
(self, w_dim, channels, seq_len, equalized_lr)
density/models.py:622
Method__init__
(self)
density/dataset.py:18
Method__init__
(self, filelist, zdim, mean=0, std=1, preload=False, data_type='hubert_L6')
density/dataset.py:41
Method__init__
Approximates a KL divergence metric between 1D distributions of values from real and fake c embeddings.
density/metrics.py:13
Method__init__
(self, noise_std=0.05, n=2, p=0.05, ADA_N=6, ADA_adjust=0.005)
density/augment.py:14
Method__len__
(self)
density/dataset.py:81
Function_load
(pth)
density/dataset.py:14
Methodadjust_d_lr
(self, old_lr: float, clamp_min=3e-8, clamp_max=5e-3)
density/augment.py:72
Functionam_score
Calculate AM Score from `gen_probs` (N1, n_classes) and `train_probs` (N2, n_classes)
metrics.py:195
Functionasgan_hubert_sc09_6
Density GAN which generates mel-spectrograms from standard normal vectors and then uses hifigan to vocode them back to the time domain.
hubconf.py:78
Functionclosest_dist
(c_real, c_fake, reduce='mean', n1=50, n2=2500)
density/metrics.py:48
Methodextra_repr
(self)
density/models.py:58
Methodextra_repr
(self)
density/models.py:610
Functionfid
Compute FID for features of generated utterances `c_f` (N, dim) and features from training set `c_train` (N, dim).
metrics.py:125
Functionflatten_cfg
Recursively flattens a config into a flat dictionary compatible with tensorboard's `add_hparams` function.
density/config.py:137
Methodforward
`z` of shape (bs, z_dim) Returns `c` of shape (bs, seq_len, c_dim)
density/models.py:116
Methodforward
`x` of shape (bs, c_in, seq_len), `w` of shape (bs, w_dim)
density/models.py:201
Methodforward
Get Fourier features (bs, seq_len, channels) from a `w` vec (bs, w_dim)
density/models.py:301
Methodforward
Adapted from StyleGAN2 official implementation. `x` of shape (bs, channels, seq_len)
density/models.py:336
Methodforward
`c` of shape (bs, seq_len, c_dim)
density/models.py:409
Methodforward
`c` of shape (bs, c_dim, seq_len)
density/models.py:444
Methodforward
(self, c: Tensor)
density/models.py:513
Methodforward
(self, w, dummy=None)
density/models.py:655
Methodforward
(self, wav)
density/dataset.py:33
Methodgenerate_from_latent
Generate waveforms (N, 16000) from latent standard normal `z` (N, z_dim)
hubconf.py:45
Methodgenerate_from_w
Generate waveforms (N, 16000) from W latent space `w` (N, w_dim)
hubconf.py:64
Methodget_feats
Converts audio in a given `file_path` to hubert features. Optionally directly provide `audio` as 1D float numpy array of correct sam
hubert_feature_reader.py:53
Functionhubert_base
Facebook HuBERT BASE model
hubconf.py:132
Functioninception_score
Calculate inception score from `logprobs_gen` (bs, n_classes) of log probabilities. Adapted from https://github.com/HazyResearch/state-
metrics.py:15
Functionlinear_separability
Calculate linear separability with SVM, StyleGAN1-style, given deep classifier class `logits` (N, n_classes) and all the latent vectors `latents`
metrics.py:210
Functionmodified_inception_score2
Calculate modified inception score from `probs_gen` (bs, n_classes) of probabilities. Adapted from https://github.com/HazyResearch/stat
metrics.py:96
Functionndb_score
Calculates the number of statistically distinct bins (NDB) from features of real data `feat_data` (N1, dim) and features of generated da
metrics.py:62
Functionrv_collate
(xs)
density/dataset.py:140
Methodunconditional_generate
Generate `N` audio samples, returning a tensor of shape (N, 16000)
hubconf.py:33
Functionwav2hubert
(cs: Tensor, hubert, bs=32, mb=None)
density/augment.py:118
Methodz2w
Generate latent W vectors (N, w_dim) from latent standard normal `z` (N, z_dim)
hubconf.py:58