Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/addtt/ladder-vae-pytorch
/ functions
Functions
88 in github.com/addtt/ladder-vae-pytorch
⨍
Functions
88
◇
Types & classes
21
↓ 7 callers
Method
mean
(params)
lib/likelihoods.py:19
↓ 6 callers
Method
__init__
(self, channels, merge_type, nonlin=nn.LeakyReLU,
models/lvae_layers.py:329
↓ 3 callers
Method
__init__
(self, ch_in, color_channels)
lib/likelihoods.py:83
↓ 3 callers
Method
_get_binarized_mnist
Get statically binarized MNIST. Code partially taken from https://github.com/altosaar/proximity_vi/blob/master/get_binary_mnist.py
lib/datasets.py:24
↓ 3 callers
Function
_reduce
(x, reduce)
lib/likelihoods.py:414
↓ 3 callers
Function
log_discretized_logistic
Log of the probability mass of the values x under the logistic distribution with parameters mean and scale. The sum is taken over all dimensi
lib/likelihoods.py:233
↓ 2 callers
Method
__init__
(self, channels, kernel_size, nonlin=nn.LeakyReLU)
lib/nn.py:114
↓ 2 callers
Function
_input_check
(x, mean, scale_param, reduce)
lib/likelihoods.py:422
↓ 2 callers
Method
get_padded_size
Returns the smallest size (H, W) of the image with actual size given as input, such that H and W are powers of 2. :param size
models/lvae.py:327
↓ 2 callers
Method
topdown_pass
(self, bu_values=None, n_img_prior=None, mode_l
models/lvae.py:229
↓ 1 callers
Method
bottomup_pass
(self, x)
models/lvae.py:216
↓ 1 callers
Function
discretized_mix_logistic_loss
log-likelihood for mixture of discretized logistics, assumes the data has been rescaled to [-1,1] interval Code taken from pytorch adapt
lib/likelihoods.py:291
↓ 1 callers
Method
distr_params
(self, x)
lib/likelihoods.py:15
↓ 1 callers
Method
get_top_prior_param_shape
(self, n_imgs=1)
models/lvae.py:364
↓ 1 callers
Function
inspect_layer_repr
(model, img_folder, n=8)
evaluate.py:95
↓ 1 callers
Function
kl_normal_mc
One-sample estimation of element-wise KL between two diagonal multivariate normal distributions. Any number of dimensions, broadcasting s
lib/stochastic.py:209
↓ 1 callers
Function
log_bernoulli
(x, mean, reduce='mean')
lib/likelihoods.py:385
↓ 1 callers
Method
log_likelihood
(self, x, params)
lib/likelihoods.py:30
↓ 1 callers
Function
log_normal
Log of the probability density of the values x untder the Normal distribution with parameters mean and logvar. The sum is taken over all
lib/likelihoods.py:391
↓ 1 callers
Function
logistic_rsample
Returns a sample from Logistic with specified mean and log scale. :param mu_ls: a tensor containing mean and log scale along dim=1,
lib/stochastic.py:115
↓ 1 callers
Function
main
()
main.py:6
↓ 1 callers
Function
main
()
evaluate.py:117
↓ 1 callers
Method
mode
(params)
lib/likelihoods.py:23
↓ 1 callers
Method
pad_input
Pads input x so that its sizes are powers of 2 :param x: :return: Padded tensor
models/lvae.py:317
↓ 1 callers
Method
run
(self)
evaluate.py:20
↓ 1 callers
Method
sample
(params)
lib/likelihoods.py:27
↓ 1 callers
Function
sample_from_discretized_mix_logistic
Code taken from pytorch adaptation of original PixelCNN++ tf implementation https://github.com/pclucas14/pixel-cnn-pp
lib/stochastic.py:141
↓ 1 callers
Method
sample_prior
(self, n_imgs, mode_layers=None, constant_layers=None)
models/lvae.py:351
↓ 1 callers
Function
to_one_hot
(tensor, n)
lib/stochastic.py:147
Method
__init__
(self, channels, nonlin, kernel=None, grou
lib/nn.py:26
Method
__init__
(self, *args, **kwargs)
lib/nn.py:104
Method
__init__
(self, ch_in, color_channels)
lib/likelihoods.py:53
Method
__init__
(self, ch_in, color_channels, n_bins, double=False)
lib/likelihoods.py:131
Method
__init__
(self, ch_in, n_components=10)
lib/likelihoods.py:197
Method
__init__
(self, folder, train, download=False, shuffle_init=False)
lib/datasets.py:11
Method
__init__
(self, c_in, c_vars, c_out, kernel=3, transform_p_params=True)
lib/stochastic.py:15
Method
__init__
(self, color_ch, z_dims, blocks_per_layer=2,
models/lvae.py:17
Method
__init__
(self, z_dim, n_res_blocks, n_filters, is_
models/lvae_layers.py:29
Method
__init__
(self, n_res_blocks, n_filters, downsampling_steps=0,
models/lvae_layers.py:188
Method
__init__
(self, mode, c_in, c_out, nonlin=nn.LeakyR
models/lvae_layers.py:241
Method
__init__
(self, *args, upsample=False, **kwargs)
models/lvae_layers.py:311
Method
__init__
(self, *args, downsample=False, **kwargs)
models/lvae_layers.py:318
Method
__init__
(self, channels, nonlin, batchnorm, dropout, res_block_type)
models/lvae_layers.py:370
Method
__init__
(self, args, cuda)
experiment/data.py:27
Method
_add_args
(self, parser: argparse.ArgumentParser)
evaluate.py:52
Method
_add_args
(self, parser: argparse.ArgumentParser)
experiment/experiment_manager.py:107
Method
_check_args
(cls, args: argparse.Namespace)
evaluate.py:83
Method
_check_args
(cls, args: argparse.Namespace)
experiment/experiment_manager.py:262
Method
_define_args_defaults
(cls)
experiment/experiment_manager.py:84
Method
_make_datamanager
(self)
experiment/experiment_manager.py:34
Method
_make_model
(self)
experiment/experiment_manager.py:38
Method
_make_optimizer
(self)
experiment/experiment_manager.py:76
Method
_make_run_description
(args: argparse.Namespace)
experiment/experiment_manager.py:293
Function
_pad_tensor
(x, size, value=None)
lib/datasets.py:75
Method
distr_params
(self, x)
lib/likelihoods.py:60
Method
distr_params
(self, x)
lib/likelihoods.py:90
Method
distr_params
(self, x)
lib/likelihoods.py:140
Method
distr_params
(self, x)
lib/likelihoods.py:204
Method
forward
(self, x)
lib/nn.py:98
Method
forward
(self, x)
lib/nn.py:121
Method
forward
(self, input_, x)
lib/likelihoods.py:33
Method
forward
(self, p_params, q_params=None, forced_latent=None,
lib/stochastic.py:29
Method
forward
(self, x)
models/lvae.py:172
Method
forward
(self, input_=None, skip_connection_input=None, inference_mode
models/lvae_layers.py:115
Method
forward
(self, x)
models/lvae_layers.py:218
Method
forward
(self, x)
models/lvae_layers.py:300
Method
forward
(self, x, y)
models/lvae_layers.py:358
Method
forward_pass
(self, x: torch.Tensor, y: Optional[torch.Tensor] = None)
experiment/experiment_manager.py:322
Method
get_metrics_dict
(cls, results: dict)
experiment/experiment_manager.py:403
Method
list_options
(lst)
experiment/experiment_manager.py:111
Method
log_likelihood
(self, x, params)
lib/likelihoods.py:77
Method
log_likelihood
(self, x, params)
lib/likelihoods.py:112
Method
log_likelihood
(self, x, params)
lib/likelihoods.py:167
Method
log_likelihood
(self, x, params)
lib/likelihoods.py:227
Method
mean
(params)
lib/likelihoods.py:66
Method
mean
(params)
lib/likelihoods.py:100
Method
mean
(params)
lib/likelihoods.py:153
Method
mean
(params)
lib/likelihoods.py:213
Method
mode
(params)
lib/likelihoods.py:70
Method
mode
(params)
lib/likelihoods.py:104
Method
mode
(params)
lib/likelihoods.py:157
Method
mode
(params)
lib/likelihoods.py:217
Method
sample
(params)
lib/likelihoods.py:74
Method
sample
(params)
lib/likelihoods.py:108
Method
sample
(params)
lib/likelihoods.py:161
Method
sample
(params)
lib/likelihoods.py:221
Method
test_log_str
(cls, summaries: dict, step: int, epoch: Option
experiment/experiment_manager.py:380
Method
train_log_str
(cls, summaries: dict, step: int, epoch: Opt
experiment/experiment_manager.py:370