MCPcopy Create free account

hub / github.com/Dianezzy/ParaLip / functions

Functions329 in github.com/Dianezzy/ParaLip

↓ 43 callersMethodsize
Return an example's size as a float or tuple. This value is used when filtering a dataset with ``--max-positions``.
tasks/base_task.py:51
↓ 21 callersMethodget_model
(self)
utils/pl_utils.py:463
↓ 18 callersMethodupdate
(self, val, n=1)
utils/__init__.py:67
↓ 15 callersMethod__init__
(self, in_channels, out_channels, kernel_size, padding=0)
modules/operations.py:193
↓ 13 callersFunctionLayerNorm
(normalized_shape, eps=1e-5, elementwise_affine=True, export=False)
modules/operations.py:112
↓ 13 callersFunctionLinear
(in_features, out_features, bias=True)
modules/operations.py:122
↓ 8 callersMethodpad
(self)
utils/text_encoder.py:278
↓ 7 callersMethod__init__
(self, in_channels, out_channels, kernel_size=1, stride=1, padding=None, dilation=1, bias=Tr
modules/base_modules.py:307
↓ 5 callersMethodencode
Transform a human-readable string into a sequence of int ids. The ids should be in the range [num_reserved_ids, vocab_size). Ids [0,
utils/text_encoder.py:46
↓ 5 callersMethodis_function_implemented
(self, f_name)
utils/pl_utils.py:1603
↓ 5 callersFunctionset_hparams
(use_cmd=True, config='', exp_name='', hparams_str='')
utils/hparams.py:15
↓ 5 callersMethodtraining_step
(self, sample, batch_idx, optimizer_idx=-1)
tasks/base_task.py:150
↓ 5 callersMethodvalidation_step
:param sample: :param batch_idx: :return: output: dict
tasks/base_task.py:191
↓ 4 callersMethod_in_proj
(self, input, start=0, end=None)
modules/operations.py:538
↓ 4 callersMethodreduce_distributed_output
(self, output, num_gpus)
utils/pl_utils.py:1051
↓ 4 callersMethodstep
(self, num_updates)
tasks/grid_lipgen_task.py:49
↓ 4 callersMethodtest_step
(self, sample, batch_idx)
tasks/base_task.py:235
↓ 3 callersMethod__init__
(self, idim, odim, kernel_size, stride, padding, norm_fn, acti_fn, dropout_rate=0.)
modules/lip_modules/lip_utils.py:5
↓ 3 callersMethodconfigure_optimizers
(self)
tasks/base_task.py:224
↓ 3 callersMethodcopy_trainer_model_properties
(self, model)
utils/pl_utils.py:760
↓ 3 callersMethodeos
(self)
utils/text_encoder.py:281
↓ 3 callersMethodfinalize
(self)
utils/indexed_datasets.py:42
↓ 3 callersMethodinit_optimizers
(self, optimizers)
utils/pl_utils.py:482
↓ 3 callersMethodrun_pretrain_routine
Sanity check a few things before starting actual training. :param model:
utils/pl_utils.py:497
↓ 3 callersMethodstart
(cls)
tasks/base_task.py:246
↓ 2 callersFunctionEmbedding
(num_embeddings, embedding_dim, padding_idx=None)
modules/base_modules.py:396
↓ 2 callersMethod__init__
(self, img_channel, img_size, hidden_size, if_tanh=False, only_lip=False, norm_fn='none', acti_fn='relu')
modules/lip_modules/img_modules.py:9
↓ 2 callersMethod__init__
(self, data_dir, phone_encoder, prefix, hparams, shuffle=False)
tasks/grid_lipgen_task.py:66
↓ 2 callersMethod_forward
(self, xs, x_masks=None, is_inference=False)
modules/base_modules.py:85
↓ 2 callersFunction_get_full_incremental_state_key
(module_instance, key)
utils/__init__.py:201
↓ 2 callersMethod_get_input_buffer
(self, incremental_state)
modules/operations.py:546
↓ 2 callersMethod_get_input_buffer
(self, incremental_state)
modules/operations.py:610
↓ 2 callersMethod_init_vocab
Initialize vocabulary with tokens from token_generator.
utils/text_encoder.py:261
↓ 2 callersMethod_set_input_buffer
(self, incremental_state, buffer)
modules/operations.py:553
↓ 2 callersMethod_set_input_buffer
(self, incremental_state, buffer)
modules/operations.py:617
↓ 2 callersMethod_set_input_buffer
(self, incremental_state, new_buffer)
modules/operations.py:858
↓ 2 callersMethodadd_item
(self, item)
utils/indexed_datasets.py:37
↓ 2 callersMethodadd_tqdm_metrics
(self, metrics)
utils/pl_utils.py:939
↓ 2 callersFunctionbuild_phone_encoder
(data_dir)
datasets/lipgen/utils.py:24
↓ 2 callersFunctioncopy_tensor
(src, dst)
utils/__init__.py:78
↓ 2 callersMethodevaluate
Run evaluation code. :param model: PT model :param dataloaders: list of PT dataloaders :param max_batches: Scalar
utils/pl_utils.py:1145
↓ 2 callersMethodfit
(self, model)
utils/pl_utils.py:471
↓ 2 callersMethodforward
(self, signal)
modules/base_modules.py:322
↓ 2 callersMethodget_embedding
Build sinusoidal embeddings. This matches the implementation in tensor2tensor, but differs slightly from the description in Sectio
modules/operations.py:148
↓ 2 callersMethodin_proj_k
(self, key)
modules/operations.py:518
↓ 2 callersMethodin_proj_q
(self, query)
modules/operations.py:509
↓ 2 callersMethodin_proj_v
(self, value)
modules/operations.py:528
↓ 2 callersMethodlog_metrics
Logs the metric dict passed in. :param metrics: :param grad_norm_dic:
utils/pl_utils.py:918
↓ 2 callersMethodon_epoch_end
(self, epoch, logs=None)
utils/pl_utils.py:327
↓ 2 callersFunctionparallel_apply
r"""Applies each `module` in :attr:`modules` in parallel on arguments contained in :attr:`inputs` (positional) and :attr:`kwargs_tup` (keyword)
utils/pl_utils.py:80
↓ 2 callersMethodprocess_output
Reduces output according to the training mode. Separates loss from logging and tqdm metrics :param output: :return:
utils/pl_utils.py:959
↓ 2 callersMethodrestore
(self, checkpoint_path, on_gpu)
utils/pl_utils.py:651
↓ 2 callersMethodrun_evaluation
(self, test=False)
utils/pl_utils.py:1221
↓ 2 callersMethodseg
(self)
utils/text_encoder.py:287
↓ 2 callersFunctionstrip_ids
Strip ids_to_strip from the end ids.
utils/text_encoder.py:28
↓ 2 callersMethodtrain
(self)
utils/pl_utils.py:1312
↓ 2 callersMethodtransfer_batch_to_gpu
(self, batch, gpu_id)
utils/pl_utils.py:776
↓ 2 callersMethodvalidation_end
(self, outputs)
tasks/base_task.py:208
↓ 1 callersMethod__init__
( self, logger=True, checkpoint_callback=True, default_sav
utils/pl_utils.py:355
↓ 1 callersMethod__init__
(self, num_reserved_ids=NUM_RESERVED_TOKENS)
utils/text_encoder.py:39
↓ 1 callersMethod__init__
(self, data_dir, phone_encoder, prefix, hparams, shuffle=False)
tasks/timit_lipgen_task.py:14
↓ 1 callersMethod__init__
(self, *args, **kwargs)
tasks/base_task.py:74
↓ 1 callersMethod_atomic_save
Saves a checkpoint atomically, avoiding the creation of incomplete checkpoints. This will create a temporary checkpoint with a suffix of ``
utils/pl_utils.py:707
↓ 1 callersFunction_find_tensors
r""" Recursively find all tensors contained in the specified object.
utils/pl_utils.py:167
↓ 1 callersMethod_get_input_buffer
(self, incremental_state)
modules/operations.py:855
↓ 1 callersMethod_get_item
(self, index)
tasks/grid_lipgen_task.py:84
↓ 1 callersMethod_get_linearized_weight
(self)
modules/operations.py:861
↓ 1 callersFunction_high_process_lips
(vid_path, img_shape)
datasets/lipgen/grid/gen_grid_high.py:155
↓ 1 callersMethod_init_vocab_from_file
Load vocab from a file. Args: filename: The file to load vocabulary from.
utils/text_encoder.py:230
↓ 1 callersMethod_init_vocab_from_list
Initialize tokens from a list of tokens. It is ok if reserved tokens appear in the vocab list. They will be removed. The set of to
utils/text_encoder.py:245
↓ 1 callersFunction_is_batch_full
(batch, num_tokens, max_tokens, max_sentences)
utils/__init__.py:104
↓ 1 callersMethod_percent_range_check
(self, name)
utils/pl_utils.py:1608
↓ 1 callersMethod_phone_encoder
(self)
datasets/lipgen/timit/gen_timit.py:25
↓ 1 callersMethod_phone_encoder
(self)
datasets/lipgen/grid/gen_grid_high.py:37
↓ 1 callersFunction_process_lips_from_faces
(vid_path, img_shape=(80, 160, 3))
datasets/lipgen/timit/gen_timit.py:122
↓ 1 callersMethod_repeat_one_sequence
Repeat each frame according to duration. Examples: >>> x = torch.tensor([[1], [2], [3]]) tensor([[1],
modules/base_modules.py:221
↓ 1 callersMethod_safe_id_to_token
(self, idx)
utils/text_encoder.py:227
↓ 1 callersMethod_training_step
:param sample: :param batch_idx: :return: total loss: torch.Tensor, loss_log: dict
tasks/base_task.py:141
↓ 1 callersMethod_validation_end
:param outputs: :return: loss_output: dict
tasks/base_task.py:200
↓ 1 callersFunction_worker
(i, module, input, kwargs, device=None)
utils/pl_utils.py:109
↓ 1 callersMethodafter_infer
(self, predictions)
tasks/grid_lipgen_task.py:267
↓ 1 callersMethodapply_sparse_mask
(self, attn_weights, tgt_len, src_len, bsz)
modules/operations.py:561
↓ 1 callersMethodbackward
(ctx, grad_output)
utils/__init__.py:412
↓ 1 callersMethodbuild_dataloader
(self, dataset, shuffle, max_tokens=None, max_sentences=None, required_batch_size_mu
tasks/grid_lipgen_task.py:192
↓ 1 callersMethodbuild_embedding
(self, dictionary, embed_dim)
modules/base_model.py:38
↓ 1 callersMethodbuild_model
(self)
tasks/base_task.py:107
↓ 1 callersMethodbuild_optimizer
(self, model)
tasks/base_task.py:221
↓ 1 callersMethodbuild_phone_encoder
(self, data_dir)
tasks/grid_lipgen_task.py:230
↓ 1 callersMethodbuild_scheduler
(self, optimizer)
tasks/base_task.py:218
↓ 1 callersMethodcheck_index
(self, i)
utils/indexed_datasets.py:13
↓ 1 callersMethodclear_buffer
(self, input, encoder_out=None, encoder_padding_mask=None, incremental_state=None)
modules/operations.py:998
↓ 1 callersMethodclip_gradients
(self)
utils/pl_utils.py:1075
↓ 1 callersMethodconfigure_accumulated_gradients
(self, accumulate_grad_batches)
utils/pl_utils.py:1086
↓ 1 callersMethodconfigure_ddp
(self, model, device_ids)
tasks/base_task.py:278
↓ 1 callersMethoddecode
Transform a sequence of int ids into a human-readable string. EOS is not expected in ids. Args: ids: list of integers t
utils/text_encoder.py:62
↓ 1 callersMethoddecode_list
Transform a sequence of int ids into a their string versions. This method supports transforming individual input/output ids to their
utils/text_encoder.py:79
↓ 1 callersMethoddecode_list
(self, ids)
utils/text_encoder.py:216
↓ 1 callersMethoddp_train
(self, model)
utils/pl_utils.py:814
↓ 1 callersMethoddump_checkpoint
(self)
utils/pl_utils.py:728
↓ 1 callersMethodevaluation_forward
(self, model, batch, batch_idx, dataloader_idx, test=False)
utils/pl_utils.py:1280
next →1–100 of 329, ranked by callers