MCPcopy Create free account

hub / github.com/XuezheMax/flowseq / functions

Functions372 in github.com/XuezheMax/flowseq

↓ 31 callersFunctionlogging
(info, logfile)
experiments/nmt.py:26
↓ 20 callersMethodbackward
(self, input: torch.Tensor, tgt_mask: torch.Tensor, src: torch.Tensor, src_mask: torch.Tensor
flownmt/flows/nmt.py:486
↓ 20 callersMethodforward
(self, input: torch.Tensor, tgt_mask: torch.Tensor, src: torch.Tensor, src_mask: torch.Tensor)
flownmt/flows/nmt.py:465
↓ 20 callersMethodinit
(self, data: torch.Tensor, tgt_mask: torch.Tensor, src: torch.Tensor, src_mask: torch.Tensor, ini
flownmt/flows/nmt.py:512
↓ 13 callersMethod_get_core
(self)
flownmt/flownmt.py:395
↓ 10 callersMethodinit
(self, src_sents, tgt_sents, src_masks, tgt_masks, init_scale=1.0)
flownmt/flownmt.py:402
↓ 10 callersMethodsplit
(self, z, mask)
flownmt/flows/couplings/coupling.py:59
↓ 8 callersMethodload_state_dict
Loads the schedulers state. Arguments: state_dict (dict): scheduler state. Should be an object returned from a ca
flownmt/optim/lr_scheduler.py:29
↓ 8 callersMethodstate_dict
Returns the state of the scheduler as a :class:`dict`. It contains an entry for every variable in self.__dict__ which is not the opti
flownmt/optim/lr_scheduler.py:21
↓ 7 callersMethodget_lr
(self)
flownmt/optim/lr_scheduler.py:38
↓ 7 callersMethodload
(cls, model_path, device)
flownmt/flownmt.py:583
↓ 7 callersMethodloss
Args: src_sents: Tensor [batch, src_length] tensor for source sentences tgt_sents: Tensor [batch, tg
flownmt/flownmt.py:510
↓ 6 callersFunction_print
(batch, id2word)
flownmt/data/dataloader.py:510
↓ 6 callersMethodbackward
Args: *input: input [batch, *input_size] Returns: out: Tensor [batch, *input_size], logdet: Tensor [batch]
flownmt/flows/flow.py:28
↓ 6 callersFunctionbatch_size_fn
(new, count)
flownmt/data/dataloader.py:166
↓ 6 callersMethoddump_to_file
(self, ms, lengths, path, post_edit=True)
flownmt/data/dataloader.py:112
↓ 6 callersMethodlog_probability
(z, eps, mu, logvar, mask)
flownmt/modules/posteriors/posterior.py:45
↓ 6 callersMethodreparameterize
(mu, logvar, mask, nsamples=1, random=True)
flownmt/modules/posteriors/posterior.py:31
↓ 5 callersMethod_in_proj
(self, input, start=0, end=None)
flownmt/nnet/attention.py:226
↓ 5 callersMethoddecode
Args: epsilon: Tensor epslion [batch, tgt_length, nz] tgt_mask: Tensor tensor of tar
flownmt/modules/priors/prior.py:60
↓ 5 callersMethodregister
(cls, name: str)
flownmt/flows/flow.py:104
↓ 4 callersMethod__init__
(self, levels, num_steps, features, src_features, factors, hidden_features=None, inverse=False,
flownmt/flows/nmt.py:434
↓ 4 callersMethodby_name
(cls, name: str)
flownmt/flows/flow.py:108
↓ 4 callersMethodinit
(self, x, mask, src, src_mask, init_scale=1.0)
flownmt/flows/couplings/blocks.py:43
↓ 4 callersMethodregister
(cls, name: str)
flownmt/modules/decoders/decoder.py:81
↓ 4 callersMethodsample
Args: nlengths: int number of lengths per sentence nsamples: int number of samples p
flownmt/modules/priors/prior.py:89
↓ 4 callersMethodsample_from_posterior
sampling from posterior distribution Args: tgt_sents: Tensor [batch, tgt_length] tensor for target senten
flownmt/flownmt.py:86
↓ 4 callersMethodstep
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
flownmt/optim/adamw.py:52
↓ 3 callersFunctioncalc_bleu
(fref, fmt, result_path)
experiments/nmt.py:44
↓ 3 callersFunctioneval
(args, epoch, dataset, dataloader, flownmt)
experiments/nmt.py:150
↓ 3 callersMethodgather
(self, outputs, output_device)
flownmt/flows/parallel/data_parallel.py:73
↓ 3 callersMethodget_batch
(self, batch_size)
flownmt/data/dataloader.py:458
↓ 3 callersFunctionget_optimizer
(learning_rate, parameters, betas, eps, amsgrad, weight_decay, lr_decay, warmup_steps, init_lr)
experiments/nmt.py:32
↓ 3 callersMethodget_vocab
(self, path, max_vocab=-1, has_pad=True)
flownmt/data/dataloader.py:96
↓ 3 callersMethodinit
(self, x, mask, init_scale=1.0)
flownmt/nnet/transformer.py:17
↓ 3 callersMethodlength_loss
Args: ctx: Tensor tensor [batch, features] src_mask: Tensor tensor for source mask [
flownmt/modules/priors/prior.py:43
↓ 3 callersFunctionreconstruct
(epoch, dataset, dataloader, flownmt, result_path, log)
experiments/nmt.py:115
↓ 3 callersMethodregister
(cls, name: str)
flownmt/modules/posteriors/posterior.py:89
↓ 3 callersMethodsample_from_prior
sampling from prior distribution Args: src_sents: Tensor [batch, src_length] tensor for source sentences
flownmt/flownmt.py:52
↓ 3 callersMethodsave
(self, model_path)
flownmt/flownmt.py:560
↓ 3 callersFunctionsplit
Args: x: Tensor input tensor [batch, length, features] z1_features: int the number of features of z1
flownmt/utils.py:125
↓ 3 callersFunctionsqueeze
Args: x: Tensor input tensor [batch, length, features] mask: Tensor mask tensor [batch, length] f
flownmt/utils.py:79
↓ 3 callersMethodsync
(self)
flownmt/flows/nmt.py:460
↓ 3 callersFunctionunsplit
Args: xs: List[Tensor] tensors to be combined Returns: Tensor combined tensor
flownmt/utils.py:140
↓ 3 callersMethodunsplit
(self, z1, z2)
flownmt/flows/couplings/coupling.py:76
↓ 3 callersFunctionunsqueeze
Args: x: Tensor input tensor [batch, length, features] factor: int unsqueeze factor (default 2) Retur
flownmt/utils.py:104
↓ 2 callersFunctionLayerNorm
(normalized_shape, eps=1e-5, elementwise_affine=True, export=False)
flownmt/nnet/layer_norm.py:5
↓ 2 callersMethod__init__
Args: key_features: int dimension of keys query_features: int dimension of queries
flownmt/nnet/attention.py:15
↓ 2 callersMethod__init__
(self, optimizer, last_epoch=-1)
flownmt/optim/lr_scheduler.py:5
↓ 2 callersMethod__init__
(self, src_features, in_features, out_features, hidden_features, kernel_size, dropout=0.0)
flownmt/flows/couplings/blocks.py:12
↓ 2 callersMethod_in_proj_q
(self, query)
flownmt/nnet/attention.py:217
↓ 2 callersMethodbwdpass
Args: y: Tensor The random variable after flow h: list of object other conditional i
flownmt/flows/flow.py:73
↓ 2 callersFunctioncalc_bleu
(fref, fmt, result_path)
experiments/translate.py:20
↓ 2 callersMethodcalc_params
(self, z: torch.Tensor, mask: torch.Tensor, src: torch.Tensor, src_mask: torch.Tensor)
flownmt/flows/couplings/coupling.py:89
↓ 2 callersMethoddisable_allreduce
(self)
flownmt/flownmt.py:556
↓ 2 callersMethodenable_allreduce
(self)
flownmt/flownmt.py:552
↓ 2 callersMethodfilter_sents
(self, s_tokens, t_tokens)
flownmt/data/dataloader.py:306
↓ 2 callersMethodforward
Args: input: Tensor input tensor [batch, N1, N2, ..., Nl, in_features] mask: Tensor
flownmt/flows/actnorm.py:24
↓ 2 callersMethodforward
Args: *input: input [batch, *input_size] Returns: out: Tensor [batch, *input_size], logdet: Tensor [batch]
flownmt/flows/flow.py:16
↓ 2 callersMethodfrom_params
(cls, params: Dict)
flownmt/flownmt.py:592
↓ 2 callersMethodfwd
(z: torch.Tensor, mask: torch.Tensor, params)
flownmt/flows/couplings/transform.py:87
↓ 2 callersMethodget_embedding
Build sinusoidal embeddings. This matches the implementation in tensor2tensor, but differs slightly from the description in Section 3.
flownmt/nnet/positional_encoding.py:25
↓ 2 callersMethodget_pseudo_params
(params)
flownmt/flows/couplings/transform.py:68
↓ 2 callersMethodinit
(self, *input, **kwargs)
flownmt/flows/flow.py:40
↓ 2 callersMethodload_vocab
(self, path)
flownmt/data/dataloader.py:80
↓ 2 callersMethodlog_probability
Args: z: Tensor tensor of latent code [batch, length, nz] tgt_mask: Tensor tensor of
flownmt/modules/priors/prior.py:161
↓ 2 callersMethodparallel_apply
(self, replicas, inputs, kwargs, backward=False)
flownmt/flows/parallel/data_parallel.py:70
↓ 2 callersMethodpredict_length
Args: ctx: Tensor tensor [batch, features] src_mask: Tensor tensor for source mask [b
flownmt/modules/priors/prior.py:28
↓ 2 callersMethodprocess_batch
(self, minibatch)
flownmt/data/dataloader.py:385
↓ 2 callersMethodreconstruct_error
Args: src_sents: Tensor [batch, src_length] tensor for source sentences tgt_sents: Tensor [batch, tg
flownmt/flownmt.py:489
↓ 2 callersMethodregister
(cls, name: str)
flownmt/modules/encoders/encoder.py:43
↓ 2 callersMethodregister
(cls, name: str)
flownmt/modules/priors/length_predictors/predictor.py:52
↓ 2 callersMethodreplicate
(self, flow, device_ids)
flownmt/flows/parallel/data_parallel.py:64
↓ 2 callersFunctionsample
(dataset, dataloader, flownmt, result_path, outfile, tau, n_len, n_tr)
experiments/translate.py:91
↓ 2 callersMethodsave_vocab
(self, id2word, path)
flownmt/data/dataloader.py:90
↓ 2 callersMethodscatter
(self, inputs, kwargs, device_ids)
flownmt/flows/parallel/data_parallel.py:67
↓ 2 callersMethodstep
(self, epoch=None)
flownmt/optim/lr_scheduler.py:41
↓ 2 callersMethodsync
(self)
flownmt/flownmt.py:398
↓ 2 callersMethodsync_params
(self)
flownmt/flownmt.py:546
↓ 2 callersFunctiontotal_grad_norm
(parameters, norm_type=2)
flownmt/utils.py:63
↓ 2 callersFunctiontranslate_argmax
(dataset, dataloader, flownmt, result_path, outfile, tau, n_tr)
experiments/translate.py:32
↓ 2 callersMethodtranslate_argmax
Args: src_sents: Tensor [batch, src_length] tensor for source sentences src_masks: Tensor [batch, sr
flownmt/flownmt.py:418
↓ 2 callersFunctiontranslate_iw
(dataset, dataloader, flownmt, result_path, outfile, tau, n_len, n_tr)
experiments/translate.py:61
↓ 2 callersMethodtranslate_iw
Args: src_sents: Tensor [batch, src_length] tensor for source sentences src_masks: Tensor [batch, sr
flownmt/flownmt.py:439
↓ 1 callersMethod__init__
(self, core: FlowNMTCore)
flownmt/flownmt.py:389
↓ 1 callersMethod__init__
(self, embed, num_layers, latent_dim, hidden_size, heads, dropout=0.0, max_length=100)
flownmt/modules/encoders/transformer.py:14
↓ 1 callersMethod__init__
(self, embed, rnn_mode, num_layers, latent_dim, hidden_size, dropout=0.0)
flownmt/modules/encoders/rnn.py:12
↓ 1 callersMethod__init__
(self, embed, rnn_mode, num_layers, latent_dim, hidden_size, bidirectional=True, use_attn=False, dropout=0.0,
flownmt/modules/posteriors/shift_rnn.py:14
↓ 1 callersMethod__init__
(self, embed, num_layers, latent_dim, hidden_size, heads, dropout=0.0, dropword=0.0, max_length=100)
flownmt/modules/posteriors/transformer.py:15
↓ 1 callersMethod__init__
(self, embed, rnn_mode, num_layers, latent_dim, hidden_size, use_attn=False, dropout=0.0, dropword=0.0)
flownmt/modules/posteriors/rnn.py:14
↓ 1 callersMethod__init__
(self, model_dim, hidden_dim, heads, dropout=0.0, mask_diag=False)
flownmt/nnet/transformer.py:7
↓ 1 callersMethod__init__
(self, in_features, out_features, bias=True)
flownmt/nnet/weightnorm.py:10
↓ 1 callersMethod__init__
(self, in_features, inverse=False)
flownmt/flows/linear.py:12
↓ 1 callersMethod_get_heads
(in_features)
flownmt/flows/linear.py:90
↓ 1 callersMethod_in_proj_k
(self, key)
flownmt/nnet/attention.py:220
↓ 1 callersMethod_in_proj_kv
(self, key)
flownmt/nnet/attention.py:214
↓ 1 callersMethod_in_proj_qkv
(self, query)
flownmt/nnet/attention.py:211
↓ 1 callersMethod_in_proj_v
(self, value)
flownmt/nnet/attention.py:223
↓ 1 callersFunction_worker
(i, flow, input, kwargs, device=None, back=False)
flownmt/flows/parallel/parallel_apply.py:44
↓ 1 callersMethodadd_child
(self, pid)
experiments/distributed.py:114
next →1–100 of 372, ranked by callers