MCPcopy Create free account

hub / github.com/Dianezzy/ParaLip / functions

Functions329 in github.com/Dianezzy/ParaLip

Method__init__
Initialize from a file or list, one token per line. Handling of reserved tokens works as follows: - When initializing from a list,
utils/text_encoder.py:160
Method__init__
(self)
tasks/timit_lipgen_task.py:26
Method__init__
(self, optimizer)
tasks/grid_lipgen_task.py:38
Method__init__
(self)
tasks/grid_lipgen_task.py:159
Method__init__
(self, data_dir, prefix, hparams, shuffle)
tasks/base_task.py:26
Method__init__
(self)
datasets/lipgen/timit/gen_timit.py:17
Method__init__
(self)
datasets/lipgen/grid/gen_grid_high.py:11
Method__len__
(self)
utils/indexed_datasets.py:28
Method__len__
(self)
utils/text_encoder.py:224
Method__len__
(self)
tasks/base_task.py:45
Method_clear_linearized_weight
(self, *args)
modules/operations.py:869
Function_get_data_loader
(self)
utils/pl_utils.py:57
Function_process_mp4
(vid_path, img_shape)
datasets/lipgen/utils.py:8
Method_sizes
(self)
tasks/base_task.py:36
Methodbackward
(self, loss, optimizer)
tasks/base_task.py:354
Functionbatch_by_size
Yield mini-batches of indices bucketed by size. Batches may contain sequences of different lengths. Args: indices (List[int
utils/__init__.py:114
Methodbuild_model
(self)
tasks/grid_lipgen_task.py:187
Methodbuild_optimizer
(self, model)
tasks/grid_lipgen_task.py:238
Methodbuild_scheduler
(self, optimizer)
tasks/grid_lipgen_task.py:235
Methodclear_buffer
(self, incremental_state=None)
modules/operations.py:564
Methodclear_buffer
(self, incremental_state)
modules/operations.py:625
Methodclear_buffer
(self, input, incremental_state=None)
modules/operations.py:872
Methodclear_buffer
(self, input, encoder_out=None, encoder_padding_mask=None, incremental_state=None)
modules/operations.py:920
Methodclear_buffer
(self, input, encoder_out=None, encoder_padding_mask=None, incremental_state=None)
modules/operations.py:1111
Functioncollate_1d
Convert a list of 1d tensors into a padded 2d tensor.
utils/__init__.py:73
Functioncollate_2d
Convert a list of 2d tensors into a padded 3d tensor.
utils/__init__.py:87
Methodcollater
(self, samples)
tasks/grid_lipgen_task.py:121
Methodcollater
(self, samples)
tasks/base_task.py:42
Functioncount_parameters
(model)
utils/__init__.py:53
Functiondata_loader
Decorator to make any fx with this use the lazy property :param fn: :return:
utils/pl_utils.py:47
Methoddata_parallel
(self)
utils/pl_utils.py:460
Methodddp_train
Entry point into a DP thread :param gpu_idx: :param model: :param cluster_obj: :return:
utils/pl_utils.py:850
Methoddecode
(self, ids, strip_extraneous=False)
utils/text_encoder.py:117
Methoddecode
(self, ids, strip_eos=False, strip_padding=False)
utils/text_encoder.py:207
Methoddecode_list
(self, ids)
utils/text_encoder.py:133
Methodencode
(self, s)
utils/text_encoder.py:108
Methodencode
(self, s)
utils/text_encoder.py:153
Methodencode
Converts a space-separated string of tokens to a list of ids.
utils/text_encoder.py:197
Functionfill_with_neg_inf
FP16-compatible function that fills a tensor with -inf.
utils/__init__.py:228
Functionfill_with_neg_inf2
FP16-compatible function that fills a tensor with -inf.
utils/__init__.py:233
Methodforward
(self, query, key, value, mask=None, require_w=False)
modules/operations.py:35
Methodforward
:param x: B * T * 1 :return: x
modules/operations.py:104
Methodforward
Input is expected to be of size [bsz x seqlen].
modules/operations.py:166
Methodforward
(self, x, encoder_padding_mask=None, **kwargs)
modules/operations.py:219
Methodforward
Input shape: Time x Batch x Channel Args: key_padding_mask (ByteTensor, optional): mask to exclude keys that
modules/operations.py:303
Methodforward
(self, x, incremental_state=None)
modules/operations.py:588
Methodforward
(self, x, encoder_padding_mask=None, **kwargs)
modules/operations.py:647
Methodforward
(self, x, encoder_padding_mask=None, **kwargs)
modules/operations.py:687
Methodforward
(self, x, **kwargs)
modules/operations.py:740
Methodforward
(self, x, key, value, encoder_padding_mask=None, enc_dec_attn_constraint_mask=None)
modules/operations.py:761
Methodforward
Args: incremental_state: Used to buffer signal; if not None, then input is expected to contain a single frame.
modules/operations.py:817
Methodforward
(self, x, encoder_out=None, encoder_padding_mask=None, incremental_state=None, **kwargs)
modules/operations.py:891
Methodforward
( self, x, encoder_out=None, encoder_padding_mask=None,
modules/operations.py:943
Methodforward
(self, input, source_hids, encoder_padding_mask=None, enc_dec_attn_constraint_mask=None)
modules/operations.py:1014
Methodforward
(self, x, encoder_out=None, encoder_padding_mask=None, incremental_state=None, **kwargs)
modules/operations.py:1061
Methodforward
(self, src_tokens)
modules/base_model.py:43
Methodforward
(self, x, **kwargs)
modules/base_modules.py:23
Methodforward
Apply layer normalization. :param torch.Tensor x: input tensor :return: layer normalized tensor :rtype torch.Tensor
modules/base_modules.py:38
Methodforward
Calculate forward propagation. Args: xs (Tensor): Batch of input sequences (B, Tmax, idim). x_masks (ByteTensor, op
modules/base_modules.py:107
Methodforward
Calculate forward propagation. Args: outputs (Tensor): Batch of prediction durations in log domain (B, T) targets (
modules/base_modules.py:143
Methodforward
Calculate forward propagation. Args: xs (Tensor): Batch of sequences of char or phoneme embeddings (B, Tmax, D). ds
modules/base_modules.py:204
Methodforward
:param x: [B, T, C] :param require_w: True if this module needs to return weight matrix :return: [B, T, C]
modules/base_modules.py:274
Methodforward
:param src_tokens: [B, T] :return: { 'encoder_out': [T x B x C] 'encoder_padding_mask': [B x T]
modules/base_modules.py:362
Methodforward
:param src_tokens: [B, T] :param vid2ph: :param guide_face: [B, img_h, img_w, C] :return: { 'lip_o
modules/fslip.py:17
Methodforward
(self, inputs)
modules/lip_modules/lip_utils.py:15
Methodforward
(self, inputs)
modules/lip_modules/lip_utils.py:30
Methodforward
(self, inputs)
modules/lip_modules/lip_utils.py:44
Methodforward
(self, inputs)
modules/lip_modules/lip_utils.py:58
Methodforward
(self, inputs)
modules/lip_modules/img_modules.py:32
Methodforward
(self, concat_z, img_e_conv1, img_e_conv2, img_e_conv3, img_e_conv4)
modules/lip_modules/img_modules.py:81
Methodforward
(self, concat_z, img_e_conv1, img_e_conv2, img_e_conv3, img_e_conv4)
modules/lip_modules/img_modules.py:123
Methodforward
(self, *inputs, **kwargs)
utils/pl_utils.py:188
Methodforward
(self, *inputs, **kwargs)
utils/pl_utils.py:230
Methodforward
(ctx, x, l, c)
utils/__init__.py:406
Functionget_diagonal_focus_rate
attn: bx x L_t x L_s attn_ks: shape: tensor with shape [batch_size], input_lens/output_lens diagonal: y=k*x (k=attn_ks, x:outpu
utils/__init__.py:295
Functionget_focus_rate
attn: bs x L_t x L_s
utils/__init__.py:252
Functionget_incremental_state
Helper for getting incremental state for an nn.Module.
utils/__init__.py:213
Functionget_num_heads
(arch)
utils/__init__.py:352
Functionget_phone_coverage_rate
attn: bs x L_t x L_s
utils/__init__.py:275
Functionget_word_coverage_rate
attn: bs x L_t x L_s
utils/__init__.py:267
Methoditem_name2spk_id
(self, item_name)
datasets/lipgen/grid/gen_grid_high.py:34
Methodload_ckpt
(self, ckpt_base_dir, model_name='model', force=True, strict=True)
tasks/base_task.py:110
Functionmake_positions
Replace non-padding symbols with their position numbers. Position numbers begin at padding_idx+1. Padding symbols are ignored.
utils/__init__.py:171
Methodmax_positions
Maximum number of supported positions.
modules/operations.py:187
Functionmove_to_cpu
(tensors)
utils/__init__.py:35
Functionmove_to_cuda
(tensor)
utils/__init__.py:47
Methodnum_gpus
(self)
utils/pl_utils.py:452
Functionnum_params
(model, print_out=True)
utils/__init__.py:395
Methodnum_reserved_ids
(self)
utils/text_encoder.py:43
Methodnum_tokens
(self, index)
tasks/base_task.py:48
Methodnum_workers
(self)
tasks/base_task.py:69
Methodon_before_zero_grad
(self, optimizer)
tasks/base_task.py:348
Methodon_epoch_end
(self)
tasks/base_task.py:185
Methodon_load_checkpoint
(self, checkpoint)
tasks/base_task.py:321
Methodoptimizer_closure
()
utils/pl_utils.py:1473
Methodprocess_item
(item_name, ph_and_dur_fn, frames_fn, encoder, hparams)
datasets/lipgen/timit/gen_timit.py:101
Methodprocess_item
(ph_fn, txt_fn, frames_fn, encoder, hparams)
datasets/lipgen/grid/gen_grid_high.py:66
Functionreduce_tensors
(metrics)
utils/__init__.py:12
Functionremove_padding
(x, padding_idx=0)
utils/__init__.py:367
Methodsave_checkpoint
(self, filepath)
utils/pl_utils.py:724
← previousnext →201–300 of 329, ranked by callers