MCPcopy Create free account

hub / github.com/3DTopia/DynamicCity / functions

Functions220 in github.com/3DTopia/DynamicCity

↓ 23 callersFunction_extract_into_tensor
Extract values from a 1-D numpy array for a batch of indices. :param arr: the 1-D numpy array. :param timesteps: a tensor of indices into
dynamic_city/diffusion/gaussian_diffusion.py:871
↓ 18 callersFunctiondistributed
()
dynamic_city/utils/dist_utils.py:5
↓ 17 callersFunctionwlog
(*args, **kwargs)
dynamic_city/utils/dist_utils.py:33
↓ 11 callersFunctionrank_0
()
dynamic_city/utils/dist_utils.py:9
↓ 10 callersFunctionprint_text
(*args, **kwargs)
dynamic_city/utils/dist_utils.py:28
↓ 7 callersMethodprocess_plane
(self, x, name)
dynamic_city/vae/encoder.py:142
↓ 6 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
dynamic_city/diffusion/gaussian_diffusion.py:16
↓ 6 callersMethodstep
(self, voxels)
dynamic_city/trainer/vae_trainer.py:247
↓ 5 callersMethod__init__
(self, dropout_prob)
dynamic_city/diffusion/embedders.py:50
↓ 4 callersMethod_wrap_model
(self, model)
dynamic_city/diffusion/respace.py:105
↓ 4 callersFunctionflush_text
()
dynamic_city/utils/dist_utils.py:23
↓ 4 callersFunctionload_conf
(conf_name, print_conf=False)
dynamic_city/utils/ckpt_utils.py:32
↓ 4 callersMethodp_mean_variance
Apply the model to get p(x_{t-1} | x_t), as well as a prediction of the initial x, x_0. :param model: the model, which takes
dynamic_city/diffusion/gaussian_diffusion.py:254
↓ 4 callersMethodq_posterior_mean_variance
Compute the mean and variance of the diffusion posterior: q(x_{t-1} | x_t, x_0)
dynamic_city/diffusion/gaussian_diffusion.py:232
↓ 4 callersMethodupdate_metrics
(self, pred, gt, mask=None, name='train')
dynamic_city/trainer/vae_trainer.py:343
↓ 3 callersFunction_get_ckpts_sorted
(pattern, func=None)
dynamic_city/utils/ckpt_utils.py:9
↓ 3 callersMethod_predict_eps_from_xstart
(self, x_t, t, pred_xstart)
dynamic_city/diffusion/gaussian_diffusion.py:341
↓ 3 callersMethod_vb_terms_bpd
Get a term for the variational lower-bound. The resulting units are bits (rather than nats, as one might expect). This allows
dynamic_city/diffusion/gaussian_diffusion.py:682
↓ 3 callersFunctioncleanup_dist
()
dynamic_city/utils/torch_utils.py:28
↓ 3 callersFunctionget_dataloader
(dataset, batch_size, num_workers, seed=0, shuffle=True, drop_last=False)
dynamic_city/utils/data_utils.py:18
↓ 3 callersFunctionmodulate
(x, shift, scale)
dynamic_city/utils/dit_utils.py:66
↓ 3 callersFunctionparse_semantic_dict
(semantic_dict)
dynamic_city/utils/data_utils.py:84
↓ 3 callersFunctionset_seed
(global_seed, deterministic=False, rank=0)
dynamic_city/utils/torch_utils.py:33
↓ 3 callersFunctionset_tf32
(use_tf32=True)
dynamic_city/utils/torch_utils.py:47
↓ 3 callersFunctionsetup_dist
Setup distributed training if script is launched with torchrun. Currently only supports single node multi GPU.
dynamic_city/utils/torch_utils.py:11
↓ 3 callersMethodupdate
(self, pred, gt)
dynamic_city/utils/metrics.py:25
↓ 2 callersMethod__init__
(self, channels, up_xy=(1, 1))
dynamic_city/vae/decoder_blocks.py:44
↓ 2 callersMethod__init__
(self, dim, depth, heads, mlp_dim, dropout=0.)
dynamic_city/vae/encoder_blocks.py:77
↓ 2 callersMethod__init__
( self, # config args depth=28, hidden_size=1152, patch_size=2,
dynamic_city/diffusion/models.py:81
↓ 2 callersMethod_predict_xstart_from_eps
(self, x_t, t, eps)
dynamic_city/diffusion/gaussian_diffusion.py:334
↓ 2 callersFunction_warmup_beta
(beta_start, beta_end, num_diffusion_timesteps, warmup_frac)
dynamic_city/diffusion/gaussian_diffusion.py:58
↓ 2 callersFunctionapprox_standard_normal_cdf
A fast approximation of the cumulative distribution function of the standard normal.
dynamic_city/utils/diffusion_utils.py:39
↓ 2 callersMethodbatch_forward
(self, x)
dynamic_city/vae/encoder_blocks.py:86
↓ 2 callersFunctioncompose_hexplane_channelwise
(feat_maps)
dynamic_city/utils/vae_train_utils.py:17
↓ 2 callersMethodcondition_score
Compute what the p_mean_variance output would have been, should the model's score function be conditioned by cond_fn. See con
dynamic_city/diffusion/gaussian_diffusion.py:358
↓ 2 callersFunctioncreate_diffusion
( timestep_respacing, noise_schedule="linear", use_kl=False, sigma_small=False, predict_xs
dynamic_city/diffusion/__init__.py:10
↓ 2 callersFunctiondecompose_hexplane_channelwise
(h, t, sizes_xyz, sizes_t)
dynamic_city/utils/vae_train_utils.py:36
↓ 2 callersFunctionflatten_probas
Flattens predictions in the batch DynamicCity: changed some dimensions
dynamic_city/utils/lovasz.py:84
↓ 2 callersMethodforward_step
(self, batch, name='train')
dynamic_city/trainer/vae_trainer.py:277
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
dynamic_city/utils/dit_utils.py:44
↓ 2 callersFunctionget_latest_ckpt
(prefix)
dynamic_city/utils/ckpt_utils.py:26
↓ 2 callersMethodget_metrics
(self, tp=None, fp=None, fn=None, bin_tp=None, bin_fp=None, bin_fn=None, mask=False)
dynamic_city/utils/metrics.py:56
↓ 2 callersMethodget_metrics_dist
(self)
dynamic_city/utils/metrics.py:79
↓ 2 callersFunctionget_pred_label
(pred, dim=-1)
dynamic_city/utils/vae_train_utils.py:5
↓ 2 callersFunctionget_rollout_mask
(txyz)
dynamic_city/utils/hexplane_utils.py:40
↓ 2 callersFunctionget_vae_ckpt
(prefix, epoch='*')
dynamic_city/utils/ckpt_utils.py:18
↓ 2 callersFunctionhexplane_to_rollout
Padded rollout, converts hexplane to (b, c, x+t+z, y+z+t) - xy: :x, :y - xz: :x, y:y+z - zy: x+t:, - tx: :x, y+z: - ty: x:x+t
dynamic_city/utils/hexplane_utils.py:4
↓ 2 callersMethodlog_metrics_and_reset
(self, name='train')
dynamic_city/trainer/vae_trainer.py:351
↓ 2 callersFunctionlovasz_softmax_flat
Multi-class Lovasz-Softmax loss probas: [P, C] Variable, class probabilities at each prediction (between 0 and 1) labels: [P] Tensor,
dynamic_city/utils/lovasz.py:53
↓ 2 callersFunctionmean
nanmean compatible with generators.
dynamic_city/utils/lovasz.py:116
↓ 2 callersFunctionnormal_kl
Compute the KL divergence between two gaussians. Shapes are automatically broadcasted, so batches can be compared to scalars, among other
dynamic_city/utils/diffusion_utils.py:10
↓ 2 callersFunctionparse_rollout_path
(dataset_cfg, voxel_path)
dynamic_city/utils/data_utils.py:101
↓ 2 callersMethodpredict_epoch
(self, name, save_rollout, save_voxel, save_layout)
dynamic_city/trainer/vae_trainer.py:370
↓ 2 callersMethodq_sample
Diffuse the data for a given number of diffusion steps. In other words, sample from q(x_t | x_0). :param x_start: the initial
dynamic_city/diffusion/gaussian_diffusion.py:215
↓ 2 callersMethodreset
(self)
dynamic_city/utils/metrics.py:16
↓ 2 callersMethodsave_checkpoint
(self, ckpt_path)
dynamic_city/trainer/dit_trainer.py:136
↓ 2 callersMethodsave_checkpoint
(self, ckpt_path)
dynamic_city/trainer/vae_trainer.py:151
↓ 2 callersMethodtrain_valid_epoch_end
(self, name='train')
dynamic_city/trainer/vae_trainer.py:329
↓ 2 callersFunctionupdate_ema
Step the EMA model towards the current model.
dynamic_city/utils/dit_utils.py:71
↓ 2 callersMethodvox_convs
(self, x, encoder, one_hot=False)
dynamic_city/vae/encoder.py:54
↓ 2 callersFunctionzero_module
(module)
dynamic_city/utils/vae_train_utils.py:11
↓ 1 callersMethod__init__
(self, conf)
dynamic_city/vae/decoder.py:10
↓ 1 callersMethod__init__
(self, conf)
dynamic_city/vae/vae.py:53
↓ 1 callersMethod__init__
(self, conf)
dynamic_city/vae/encoder.py:73
↓ 1 callersMethod__init__
(self, model, timestep_map, original_num_steps)
dynamic_city/diffusion/respace.py:118
↓ 1 callersMethod__init__
(self, dim, num_heads, qkv_bias=False, attn_drop=0., proj_drop=0.)
dynamic_city/utils/attention_utils.py:7
↓ 1 callersMethod__init__
(self, dit_conf, vae_conf, split)
dynamic_city/dataset/carlasc.py:41
↓ 1 callersFunction_kl_loss
(mu, logvar)
dynamic_city/utils/loss_utils.py:10
↓ 1 callersMethod_prior_bpd
Get the prior KL term for the variational lower-bound, measured in bits-per-dim. This term can't be optimized, as it only dep
dynamic_city/diffusion/gaussian_diffusion.py:799
↓ 1 callersMethod_warmed_up
(self)
dynamic_city/diffusion/timestep_sampler.py:149
↓ 1 callersFunctionadd_positional_encoding
(voxel, pos_num_freq)
dynamic_city/utils/vae_train_utils.py:51
↓ 1 callersMethodafter_step
(self, loss)
dynamic_city/trainer/dit_trainer.py:176
↓ 1 callersFunctionapply_augmentation
(voxels, masks, paths, aug_type=0)
dynamic_city/utils/data_utils.py:42
↓ 1 callersMethodbackward_step
(self, loss)
dynamic_city/trainer/dit_trainer.py:168
↓ 1 callersMethodbackward_step
(self, loss)
dynamic_city/trainer/vae_trainer.py:310
↓ 1 callersFunctionbetas_for_alpha_bar
Create a beta schedule that discretizes the given alpha_t_bar function, which defines the cumulative product of (1-beta) over time from t = [
dynamic_city/diffusion/gaussian_diffusion.py:125
↓ 1 callersFunctionbuild_losses
(model_conf, **kwargs)
dynamic_city/utils/loss_utils.py:59
↓ 1 callersFunctioncalculate_ce_weight
(dataset_conf)
dynamic_city/utils/loss_utils.py:46
↓ 1 callersMethodcompute_loss
model_out should contain 'pred' for ce and lovasz, 'mus' and 'logvars' for kl
dynamic_city/trainer/vae_trainer.py:260
↓ 1 callersMethodcondition_mean
Compute the mean for the previous step, given a function cond_fn that computes the gradient of a conditional log probability with res
dynamic_city/diffusion/gaussian_diffusion.py:346
↓ 1 callersFunctionconvert_voxels_to_layouts
(voxels, down_size)
dynamic_city/utils/data_utils.py:92
↓ 1 callersMethodddim_sample
Sample x_{t-1} from the model using DDIM. Same usage as p_sample().
dynamic_city/diffusion/gaussian_diffusion.py:513
↓ 1 callersMethodddim_sample_loop_progressive
Use DDIM to sample from the model and yield intermediate samples from each timestep of DDIM. Same usage as p_sample_loop_prog
dynamic_city/diffusion/gaussian_diffusion.py:633
↓ 1 callersFunctiondiscretized_gaussian_log_likelihood
Compute the log-likelihood of a Gaussian distribution discretizing to a given image. :param x: the target images. It is assumed that this
dynamic_city/utils/diffusion_utils.py:62
↓ 1 callersMethoddrop
(self, x)
dynamic_city/diffusion/embedders.py:55
↓ 1 callersMethodfit
(self)
dynamic_city/trainer/dit_trainer.py:235
↓ 1 callersMethodforward
(self, x, train, drop_sample=False, drop_all=False)
dynamic_city/diffusion/embedders.py:76
↓ 1 callersMethodforward
( self, x, t, hexplane, layout, cmd, traj, inference=False, drop_hex=False, drop_layout=False,
dynamic_city/diffusion/models.py:213
↓ 1 callersMethodforward_step
(self, batch)
dynamic_city/trainer/dit_trainer.py:147
↓ 1 callersMethodforward_voxel
(self, voxel)
dynamic_city/vae/decoder.py:32
↓ 1 callersFunctionget_2d_sincos_pos_embed
grid_size: int or tuple of the grid height and width return: pos_embed: [height*width, embed_dim] or [1+height*width, embed_dim] (w/ or w
dynamic_city/utils/dit_utils.py:8
↓ 1 callersFunctionget_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
dynamic_city/utils/dit_utils.py:33
↓ 1 callersFunctionget_args
()
infer_vae.py:16
↓ 1 callersFunctionget_args
()
infer_dit.py:30
↓ 1 callersFunctionget_beta_schedule
This is the deprecated API for creating beta schedules. See get_named_beta_schedule() for the new library of schedules.
dynamic_city/diffusion/gaussian_diffusion.py:65
↓ 1 callersFunctionget_command
(traj_rot, angle_thr, forward_thr)
dynamic_city/utils/data_utils.py:64
↓ 1 callersFunctionget_dit_ckpt
(prefix, step=-1)
dynamic_city/utils/ckpt_utils.py:22
↓ 1 callersFunctionget_hexplane_dataloaders
(dit_conf, vae_conf, split='train')
dynamic_city/dataset/builder.py:28
↓ 1 callersFunctionget_occ_sequence_dataloaders
(dataset_conf, conf=None)
dynamic_city/dataset/builder.py:5
↓ 1 callersMethodget_resume_ckpt_path
(self)
dynamic_city/trainer/dit_trainer.py:112
next →1–100 of 220, ranked by callers