MCPcopy Create free account

hub / github.com/Hzfinfdu/Diffusion-BERT / functions

Functions340 in github.com/Hzfinfdu/Diffusion-BERT

Functiondiscrete_diffusion_predict_fn
Predict an image or text from a diffusion model. Args: params: a PyTree of parameters for the model. rng_key: an RNG key. targets: igno
diffusion_condition.py:863
Functionelbo_body_fn
(state, _)
diffusion_word_freq.py:787
Functionelbo_body_fn
(state, _)
diffusion_condition.py:805
Methodfeed_forward_chunk
(self, attention_output)
models/modeling_bert.py:548
Methodfeed_forward_chunk
(self, attention_output)
models/modeling_roberta.py:464
Methodfeed_forward_chunk
(self, attention_output)
models/modeling_bert_new_timestep.py:576
Functionfori_loop
(lower, upper, body_fun, init_val)
utils.py:5
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, token_type_ids: Optional[torch.L
models/modeling_bert.py:205
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_bert.py:281
Methodforward
(self, hidden_states: torch.Tensor, input_tensor: torch.Tensor)
models/modeling_bert.py:383
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_bert.py:415
Methodforward
(self, hidden_states: torch.Tensor)
models/modeling_bert.py:448
Methodforward
(self, hidden_states: torch.Tensor, input_tensor: torch.Tensor)
models/modeling_bert.py:461
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_bert.py:483
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_bert.py:561
Methodforward
(self, hidden_states: torch.Tensor)
models/modeling_bert.py:657
Methodforward
(self, hidden_states: torch.Tensor)
models/modeling_bert.py:676
Methodforward
(self, hidden_states)
models/modeling_bert.py:697
Methodforward
(self, sequence_output: torch.Tensor)
models/modeling_bert.py:708
Methodforward
(self, pooled_output)
models/modeling_bert.py:718
Methodforward
(self, sequence_output, pooled_output)
models/modeling_bert.py:729
Methodforward
r""" encoder_hidden_states (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*): Sequence of h
models/modeling_bert.py:918
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the masked lan
models/modeling_bert.py:1075
Methodforward
r""" encoder_hidden_states (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*): Sequence of h
models/modeling_bert.py:1191
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the masked language mo
models/modeling_bert.py:1331
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the next sequence prediction (classifi
models/modeling_bert.py:1423
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the sequence classification/regression
models/modeling_bert.py:1541
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the multiple choice classification los
models/modeling_bert.py:1641
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the token classificati
models/modeling_bert.py:1742
Methodforward
r""" start_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for position (index) of the start of the la
models/modeling_bert.py:1827
Methodforward
( self, input_ids=None, token_type_ids=None, position_ids=None, inputs_embeds=None, past_key_values_le
models/modeling_roberta.py:99
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_roberta.py:192
Methodforward
(self, hidden_states: torch.Tensor, input_tensor: torch.Tensor)
models/modeling_roberta.py:295
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_roberta.py:328
Methodforward
(self, hidden_states: torch.Tensor)
models/modeling_roberta.py:362
Methodforward
(self, hidden_states: torch.Tensor, input_tensor: torch.Tensor)
models/modeling_roberta.py:376
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_roberta.py:399
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_roberta.py:478
Methodforward
(self, hidden_states: torch.Tensor)
models/modeling_roberta.py:575
Methodforward
r""" encoder_hidden_states (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*): Sequence of h
models/modeling_roberta.py:748
Methodforward
r""" encoder_hidden_states (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*): Sequence of h
models/modeling_roberta.py:911
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the masked language mo
models/modeling_roberta.py:1074
Methodforward
(self, features, **kwargs)
models/modeling_roberta.py:1146
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the sequence classification/regression
models/modeling_roberta.py:1191
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the multiple choice classification los
models/modeling_roberta.py:1288
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the token classificati
models/modeling_roberta.py:1388
Methodforward
(self, features, **kwargs)
models/modeling_roberta.py:1454
Methodforward
r""" start_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for position (index) of the start of the la
models/modeling_roberta.py:1494
Methodforward
( self, input_ids: Optional[torch.LongTensor] = None, token_type_ids: Optional[torch.L
models/modeling_bert_new_timestep.py:223
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_bert_new_timestep.py:296
Methodforward
(self, hidden_states: torch.Tensor, input_tensor: torch.Tensor)
models/modeling_bert_new_timestep.py:398
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_bert_new_timestep.py:430
Methodforward
(self, hidden_states: torch.Tensor)
models/modeling_bert_new_timestep.py:463
Methodforward
(self, hidden_states: torch.Tensor, input_tensor: torch.Tensor)
models/modeling_bert_new_timestep.py:476
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_bert_new_timestep.py:504
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.FloatTensor] = Non
models/modeling_bert_new_timestep.py:589
Methodforward
(self, hidden_states: torch.Tensor)
models/modeling_bert_new_timestep.py:688
Methodforward
(self, hidden_states: torch.Tensor)
models/modeling_bert_new_timestep.py:707
Methodforward
(self, hidden_states)
models/modeling_bert_new_timestep.py:728
Methodforward
(self, sequence_output: torch.Tensor)
models/modeling_bert_new_timestep.py:739
Methodforward
(self, pooled_output)
models/modeling_bert_new_timestep.py:749
Methodforward
(self, sequence_output, pooled_output)
models/modeling_bert_new_timestep.py:760
Methodforward
r""" encoder_hidden_states (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*): Sequence of h
models/modeling_bert_new_timestep.py:949
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the masked lan
models/modeling_bert_new_timestep.py:1107
Methodforward
r""" encoder_hidden_states (`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*): Sequence of h
models/modeling_bert_new_timestep.py:1223
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the masked language mo
models/modeling_bert_new_timestep.py:1363
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the next sequence prediction (classifi
models/modeling_bert_new_timestep.py:1455
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the sequence classification/regression
models/modeling_bert_new_timestep.py:1573
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the multiple choice classification los
models/modeling_bert_new_timestep.py:1673
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing the token classificati
models/modeling_bert_new_timestep.py:1774
Methodforward
r""" start_positions (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for position (index) of the start of the la
models/modeling_bert_new_timestep.py:1859
Methodget
(self, t)
diffusion_word_freq.py:394
Methodget
(self, t)
diffusion_condition.py:429
Methodget_input_embeddings
(self)
models/modeling_bert.py:897
Methodget_input_embeddings
(self)
models/modeling_roberta.py:726
Methodget_input_embeddings
(self)
models/modeling_bert_new_timestep.py:928
Methodget_output_embeddings
(self)
models/modeling_bert.py:1067
Methodget_output_embeddings
(self)
models/modeling_bert.py:1178
Methodget_output_embeddings
(self)
models/modeling_bert.py:1316
Methodget_output_embeddings
(self)
models/modeling_roberta.py:903
Methodget_output_embeddings
(self)
models/modeling_roberta.py:1058
Methodget_output_embeddings
(self)
models/modeling_bert_new_timestep.py:1099
Methodget_output_embeddings
(self)
models/modeling_bert_new_timestep.py:1210
Methodget_output_embeddings
(self)
models/modeling_bert_new_timestep.py:1348
Methodget_qt_given_q0
Get q(x_t), the n-step posterior. For example, for t = 0, it returns q0 unchanged. Args: q0: an array of floats specifying a
diffusion_word_freq.py:66
Methodget_qt_given_q0
Get q(x_t), the n-step posterior. For example, for t = 0, it returns q0 unchanged. Args: q0: an array of floats specifying a
diffusion_condition.py:66
Functionget_timestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be
models/modeling_bert_new_timestep.py:181
Functionkl_divergence_with_probs
Compute the KL between two categorical distributions from their probabilities. Args: p: [..., dim] array with probs for the first distribution
losses.py:6
Methodload_original
(self, split)
dataloader.py:47
Functionload_tf_weights_in_bert
Load tf checkpoints in a pytorch model.
models/modeling_bert.py:109
Functionload_tf_weights_in_bert
Load tf checkpoints in a pytorch model.
models/modeling_bert_new_timestep.py:109
Functionmin_max_norm
(t, dim)
utils.py:28
Methodmy_load
(self, splits)
dataloader.py:69
Methodnew_convert_to_features
(example_batch, model_tokenizer, electra_tokenizer, electra_model)
dataloader.py:164
Methodpost_process_sample_in_prediction
(self, sample, x_0)
sample.py:9
Methodpost_process_sample_in_prediction
(self, sample, x_0)
sample.py:34
Methodprepare_inputs_for_generation
(self, input_ids, past=None, attention_mask=None, **model_kwargs)
models/modeling_bert.py:1276
Methodprepare_inputs_for_generation
(self, input_ids, attention_mask=None, **model_kwargs)
models/modeling_bert.py:1390
Methodprepare_inputs_for_generation
(self, input_ids, past=None, attention_mask=None, **model_kwargs)
models/modeling_roberta.py:1015
Methodprepare_inputs_for_generation
(self, input_ids, past=None, attention_mask=None, **model_kwargs)
models/modeling_bert_new_timestep.py:1308
← previousnext →201–300 of 340, ranked by callers