MCPcopy Create free account

hub / github.com/MotrixLab/FineMoGen / functions

Functions416 in github.com/MotrixLab/FineMoGen

↓ 32 callersFunctionget_part_slice
(idx_list, func)
mogen/models/transformers/finemogen.py:54
↓ 25 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 int
mogen/models/utils/gaussian_diffusion.py:1163
↓ 8 callersFunctionto_cpu
(x)
mogen/models/architectures/base_architecture.py:8
↓ 6 callersMethod__init__
(self, word_size, pos_size, hidden_size, output_size, max_text_len)
mogen/models/rnns/t2m_bigru.py:108
↓ 6 callersFunctionbuild_submodule
Build submodule.
mogen/models/builder.py:29
↓ 6 callersMethodencode_motion
(self, motion, motion_length, motion_mask, device)
mogen/core/evaluation/evaluators/base_evaluator.py:126
↓ 6 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
mogen/models/utils/gaussian_diffusion.py:165
↓ 5 callersFunctionbuild_attention
Build attention.
mogen/models/builder.py:34
↓ 5 callersMethodprepare_results
(self, results)
mogen/core/evaluation/evaluators/base_evaluator.py:59
↓ 5 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 initi
mogen/models/utils/gaussian_diffusion.py:403
↓ 5 callersFunctionzero_module
Zero out the parameters of a module and return it.
mogen/models/utils/misc.py:17
↓ 4 callersMethod__init__
(self, latent_dim, ffn_dim, dropout, time_embed_dim, **kwargs)
mogen/models/transformers/finemogen.py:185
↓ 4 callersFunction_copysign
Return a tensor where each element has the absolute value taken from the, corresponding element of a, with sign taken from the corresponding
mogen/datasets/pipelines/rotation_conversions.py:67
↓ 4 callersMethod_scale_timesteps
(self, t)
mogen/models/utils/gaussian_diffusion.py:567
↓ 4 callersFunction_sqrt_positive_part
Returns torch.sqrt(torch.max(0, x)) but with a zero subgradient where x is 0.
mogen/datasets/pipelines/rotation_conversions.py:85
↓ 4 callersFunctionbuild_dataset
Build dataset by the given config.
mogen/datasets/builder.py:28
↓ 4 callersFunctionget_ffn
(latent_dim, ffn_dim)
mogen/models/attentions/fine_attention.py:57
↓ 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
mogen/models/utils/gaussian_diffusion.py:443
↓ 4 callersMethodq_posterior_mean_variance
Compute the mean and variance of the diffusion posterior: q(x_{t-1} | x_t, x_0)
mogen/models/utils/gaussian_diffusion.py:422
↓ 4 callersFunctionqmul
Multiply quaternion(s) q with quaternion(s) r. Expects two equally-sized tensors of shape (*, 4), where * denotes any number of dimen
mogen/datasets/pipelines/quaternion.py:35
↓ 4 callersFunctionqnormalize
(q)
mogen/datasets/pipelines/quaternion.py:30
↓ 4 callersFunctionqrot_np
(q, v)
mogen/datasets/pipelines/quaternion.py:144
↓ 3 callersMethod__init__
(self, latent_dim, ffn_dim, dropout)
mogen/models/transformers/remodiffuse.py:17
↓ 3 callersMethod_get_pos_ohot
(self, pos)
mogen/models/utils/word_vectorizer.py:61
↓ 3 callersMethod_predict_eps_from_xstart
(self, x_t, t, pred_xstart)
mogen/models/utils/gaussian_diffusion.py:561
↓ 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 allow
mogen/models/utils/gaussian_diffusion.py:954
↓ 3 callersMethod_wrap_model
(self, model)
mogen/models/utils/gaussian_diffusion.py:1277
↓ 3 callersFunctionbuild_MLP
(dim_list, latent_dim)
mogen/models/utils/mlp.py:4
↓ 3 callersFunctionbuild_architecture
Build framework.
mogen/models/builder.py:24
↓ 3 callersFunctionbuild_dataloader
Build PyTorch DataLoader. In distributed training, each GPU/process has a dataloader. In non-distributed training, there is only one dataloade
mogen/datasets/builder.py:43
↓ 3 callersFunctionbuild_loss
Build loss.
mogen/models/builder.py:19
↓ 3 callersFunctiondigit_version
Convert a version string into a tuple of integers. This method is usually used for comparing two versions. For pre-release versions: alpha < b
mogen/__init__.py:9
↓ 3 callersMethodencode_text
(self, raw_text)
mogen/models/transformers/mdm.py:111
↓ 3 callersMethodget_precompute_condition
(self, text, device=None, **kwargs)
mogen/models/transformers/mdm.py:128
↓ 3 callersMethodmask_cond
(self, cond, force_mask=False)
mogen/models/transformers/mdm.py:99
↓ 3 callersFunctionmotion_temporal_filter
(motion, sigma=1)
tools/visualize.py:16
↓ 3 callersFunctionqinv_np
(q)
mogen/datasets/pipelines/quaternion.py:25
↓ 3 callersFunctionquaternion_raw_multiply
Multiply two quaternions. Usual torch rules for broadcasting apply. Args: a: Quaternions as tensor of shape (..., 4), real part
mogen/datasets/pipelines/rotation_conversions.py:342
↓ 3 callersMethodscatter
Scatter function. Args: inputs (Tensor): Input Tensor. kwargs (dict): Args for ``mmcv.parallel.scatte
mogen/core/distributed_wrapper.py:89
↓ 2 callersMethod__init__
(self, input_feats=263, latent_dim=256, ff_size=1024,
mogen/models/transformers/mdm.py:38
↓ 2 callersMethod__init__
(self, latent_dim, ffn_dim, dropout, time_embed_dim)
mogen/models/transformers/diffusion_transformer.py:17
↓ 2 callersMethod__init__
(self, input_dim=258, latent_dim=1024, ff_size=2048,
mogen/models/transformers/intergen.py:98
↓ 2 callersMethod__init__
(self, latent_dim, num_heads, dropout, time_embed_dim=None)
mogen/models/attentions/efficient_attention.py:12
↓ 2 callersMethod__init__
(self, latent_dim, num_heads, dropout, time_embed_dim)
mogen/models/attentions/base_attention.py:67
↓ 2 callersFunction_angle_from_tan
Extract the first or third Euler angle from the two members of the matrix which are positive constant times its sine and cosine. Args:
mogen/datasets/pipelines/rotation_conversions.py:175
↓ 2 callersFunction_index_from_letter
(letter: str)
mogen/datasets/pipelines/rotation_conversions.py:207
↓ 2 callersMethod_parse_losses
Parse the raw outputs (losses) of the network. Args: losses (dict): Raw output of the network, which usually contain
mogen/models/architectures/base_architecture.py:26
↓ 2 callersMethod_predict_xstart_from_eps
(self, x_t, t, eps)
mogen/models/utils/gaussian_diffusion.py:546
↓ 2 callersFunctionapprox_standard_normal_cdf
A fast approximation of the cumulative distribution function of the standard normal.
mogen/models/utils/gaussian_diffusion.py:196
↓ 2 callersFunctionbuild_diffusion
(cfg)
mogen/models/architectures/diffusion_architecture.py:24
↓ 2 callersFunctionbuild_from_cfg
(cfg, registry, default_args=None)
mogen/models/builder.py:5
↓ 2 callersFunctioncalculate_activation_statistics
Params: -- activation: num_samples x dim_feat Returns: -- mu: dim_feat -- sigma: dim_feat x dim_feat
mogen/core/evaluation/utils.py:42
↓ 2 callersFunctioncheck_path_existence
Check whether a file or a directory exists at the expected path. Args: path_str (str): Path to check. path_type (Lite
mogen/utils/path_utils.py:64
↓ 2 callersFunctioncheck_path_suffix
Check whether the suffix of the path is allowed. Args: path_str (str): Path to check. allowed_suffix (List[str], opti
mogen/utils/path_utils.py:13
↓ 2 callersFunctioncollect_env
Collect the information of the running environments.
mogen/utils/collect_env.py:7
↓ 2 callersMethodencode_text
(self, text, token, device)
mogen/core/evaluation/evaluators/base_evaluator.py:148
↓ 2 callersMethodencode_text
(self, text, device)
mogen/models/transformers/remodiffuse.py:106
↓ 2 callersFunctioneuclidean_distance_matrix
Params: -- matrix1: N1 x D -- matrix2: N2 x D Returns: -- dist: N1 x N2 dist[i, j] == distance(matrix
mogen/core/evaluation/utils.py:12
↓ 2 callersMethodevaluate
(self, runner, results)
mogen/core/evaluation/eval_hooks.py:53
↓ 2 callersFunctionget_root_logger
(log_file=None, log_level=logging.INFO)
mogen/utils/logger.py:6
↓ 2 callersFunctioninit
()
mogen/utils/plot_utils.py:132
↓ 2 callersMethodload_pretrained
(self, ckpt_path)
mogen/models/rnns/t2m_bigru.py:120
↓ 2 callersFunctionnormal_kl
Compute the KL divergence between two gaussians. Shapes are automatically broadcasted, so batches can be compared to scalars, among other
mogen/models/utils/gaussian_diffusion.py:172
↓ 2 callersFunctionplot_xzPlane
(minx, maxx, miny, minz, maxz)
mogen/utils/plot_utils.py:138
↓ 2 callersMethodprocess_single_motion
(self, motion)
mogen/datasets/pipelines/siamese_motion.py:72
↓ 2 callersFunctionqeuler
Convert quaternion(s) q to Euler angles. Expects a tensor of shape (*, 4), where * denotes any number of dimensions. Returns a tensor of
mogen/datasets/pipelines/quaternion.py:79
↓ 2 callersFunctionqinv
(q)
mogen/utils/plot_utils.py:40
↓ 2 callersFunctionqinv
(q)
mogen/datasets/pipelines/quaternion.py:18
↓ 2 callersFunctionqmul_np
(q, r)
mogen/datasets/pipelines/quaternion.py:138
↓ 2 callersFunctionqrot
Rotate vector(s) v about the rotation described by quaternion(s) q. Expects a tensor of shape (*, 4) for q and a tensor of shape (*, 3) for v
mogen/utils/plot_utils.py:47
↓ 2 callersFunctionquaternion_to_matrix
Convert rotations given as quaternions to rotation matrices. Args: quaternions: quaternions with real part first, as tens
mogen/datasets/pipelines/quaternion.py:299
↓ 2 callersFunctionquaternion_to_matrix
Convert rotations given as quaternions to rotation matrices. Args: quaternions: quaternions with real part first, as ten
mogen/datasets/pipelines/rotation_conversions.py:36
↓ 2 callersMethodreparameterize
(self, mu, logvar)
mogen/models/architectures/vae_architecture.py:81
↓ 2 callersMethodretrieve
(self, caption, length, clip_model, device, idx=None)
mogen/models/transformers/remodiffuse.py:120
↓ 2 callersMethodscale_func
(self, timestep)
mogen/models/transformers/finemogen.py:254
↓ 2 callersFunctionset_requires_grad
Set requies_grad for all the networks. Args: nets (nn.Module | list[nn.Module]): A list of networks or a single network.
mogen/models/utils/misc.py:1
↓ 2 callersMethodsingle_evaluate
(self, results)
mogen/core/evaluation/evaluators/fid_evaluator.py:28
↓ 2 callersFunctiontimestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be
mogen/models/utils/position_encoding.py:42
↓ 2 callersFunctionzero_module
Zero out the parameters of a module and return it.
mogen/models/attentions/semantics_modulated.py:9
↓ 1 callersMethod__init__
(self, dataloader, start=None, interval=1,
mogen/core/evaluation/eval_hooks.py:14
↓ 1 callersMethod__init__
(self, model, timestep_map, original_num_steps)
mogen/models/utils/gaussian_diffusion.py:1285
↓ 1 callersMethod__init__
(self, d_model, dropout=0.1, max_len=5000)
mogen/models/utils/position_encoding.py:32
↓ 1 callersMethod__init__
(self, max_seq_len=16, njoints=None, nfeats=None,
mogen/models/transformers/actor.py:15
↓ 1 callersMethod__init__
(self, latent_dim, ffn_dim, dropout, time_embed_dim)
mogen/models/transformers/momatmogen.py:14
↓ 1 callersMethod__init__
(self, encoder=None, decoder=None, loss_recon=None,
mogen/models/architectures/vae_architecture.py:10
↓ 1 callersMethod__init__
(self, num_experts, topk, input_dim, ffn_dim, output_dim, num_heads, max_seq_len, gate_type,
mogen/models/attentions/fine_attention.py:17
↓ 1 callersMethod__init__
(self, latent_dim, text_latent_dim, num_heads, dropout, time_embed_dim)
mogen/models/attentions/semantics_modulated.py:21
↓ 1 callersFunction_allreduce_coalesced
(tensors, world_size, bucket_size_mb=-1)
mogen/utils/dist_utils.py:9
↓ 1 callersMethod_predict_xstart_from_xprev
(self, x_t, t, xprev)
mogen/models/utils/gaussian_diffusion.py:553
↓ 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 de
mogen/models/utils/gaussian_diffusion.py:1080
↓ 1 callersMethod_warmed_up
(self)
mogen/models/utils/gaussian_diffusion.py:161
↓ 1 callersMethodaux_loss
(self)
mogen/models/transformers/finemogen.py:260
↓ 1 callersFunctionaxis_angle_to_quaternion
Convert rotations given as axis/angle to quaternions. Args: axis_angle: Rotations given as a vector in axis angle form,
mogen/datasets/pipelines/rotation_conversions.py:451
↓ 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 = [
mogen/models/utils/gaussian_diffusion.py:263
↓ 1 callersFunctionbuild_evaluator
(metric, eval_cfg, data_len, eval_indexes)
mogen/core/evaluation/builder.py:22
↓ 1 callersFunctionbuild_optimizers
Build multiple optimizers from configs. If `cfgs` contains several dicts for optimizers, then a dict for each constructed optimizers will be r
mogen/core/optimizer/builder.py:8
↓ 1 callersMethodbuild_temporal_blocks
(self, sa_block_cfg, ca_block_cfg, ffn_cfg)
mogen/models/transformers/diffusion_transformer.py:98
↓ 1 callersMethodbuild_text_encoder
(self, text_encoder)
mogen/models/transformers/diffusion_transformer.py:106
↓ 1 callersFunctioncalculate_diversity
(activation, diversity_times, emb_scale, norm_scale)
mogen/core/evaluation/utils.py:110
↓ 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
mogen/core/evaluation/utils.py:56
next →1–100 of 416, ranked by callers