MCPcopy Create free account

hub / github.com/Lancelot39/KGSF / functions

Functions130 in github.com/Lancelot39/KGSF

↓ 13 callersMethod__init__
(self, dim=1, attn='cosine')
models/transformer.py:126
↓ 10 callersFunction_normalize
Broadcast layer norm
models/transformer.py:18
↓ 9 callersMethod__init__
(self, ninp, nhid, dropout=0.5)
models/graph.py:59
↓ 5 callersFunctioncreate_position_codes
(n_pos, dim, out)
models/transformer.py:114
↓ 5 callersMethoddata_process
(self,is_finetune=False)
dataset.py:136
↓ 5 callersMethodpadding_w2v
(self,sentence,max_length,transformer=True,pad=0,end=2,unk=3)
dataset.py:68
↓ 3 callersFunction_build_encoder
(opt, dictionary, embedding=None, padding_idx=None, reduction=True, n_positions=1024)
models/transformer.py:23
↓ 3 callersMethodbackward
Perform a backward pass. It is recommended you use this instead of loss.backward(), for integration with distributed training and F
run.py:328
↓ 3 callersMethodtrain
(self)
run.py:146
↓ 3 callersMethodval
(self,is_test=False)
run.py:240
↓ 3 callersMethodvector2sentence
(self,batch_sen)
run.py:573
↓ 3 callersMethodzero_grad
Zero out optimizer. It is recommended you call this in train_step. It automatically handles gradient accumulation if age
run.py:359
↓ 2 callersFunction_create_embeddings
Create and initialize word embeddings.
models/utils.py:31
↓ 2 callersMethod_starts
Return bsz start tokens.
model.py:183
↓ 2 callersMethod_starts
Return bsz start tokens.
models/transformer.py:1132
↓ 2 callersMethodload_model
(self)
model.py:542
↓ 2 callersMethodoutput
(self, tensor)
model.py:545
↓ 2 callersMethodsave_model
(self)
model.py:539
↓ 2 callersMethodupdate_params
Perform step of optimization, clipping gradients and adjusting LR schedule if needed. Gradient accumulation is also performed if ag
run.py:336
↓ 2 callersMethodval
(self,is_test=False)
run.py:458
↓ 1 callersFunction_build_decoder4kg
(opt, dictionary, embedding=None, padding_idx=None, n_positions=1024)
models/transformer.py:96
↓ 1 callersMethod_context_reformulate
(self,context,movies,altitude,ini_altitude,s_id,re_id)
dataset.py:238
↓ 1 callersFunction_create_entity_embeddings
Create and initialize word embeddings.
models/utils.py:42
↓ 1 callersMethod_create_selfattn_mask
(self, x)
models/transformer.py:701
↓ 1 callersMethod_create_selfattn_mask
(self, x)
models/transformer.py:893
↓ 1 callersFunction_edge_list
(kg, n_entity, hop)
model.py:29
↓ 1 callersMethodbackward
Perform a backward pass. It is recommended you use this instead of loss.backward(), for integration with distributed training and F
run.py:641
↓ 1 callersMethodbuild_model
(self,is_finetune)
run.py:139
↓ 1 callersMethodbuild_model
(self,is_finetune)
run.py:409
↓ 1 callersMethodcompute_loss
(self, output, scores)
model.py:533
↓ 1 callersFunctionconcept_edge_list4GCN
()
model.py:54
↓ 1 callersMethoddecode_forced
Decode with a fixed, true sequence, computing loss. Useful for training, or ranking fixed candidates. :param ys:
model.py:259
↓ 1 callersMethoddecode_forced
Decode with a fixed, true sequence, computing loss. Useful for training, or ranking fixed candidates. :param ys:
models/transformer.py:1177
↓ 1 callersMethoddecode_greedy
Greedy search :param int bsz: Batch size. Because encoder_states is model-specific, it cannot infer thi
model.py:187
↓ 1 callersMethoddecode_greedy
Greedy search :param int bsz: Batch size. Because encoder_states is model-specific, it cannot infer thi
models/transformer.py:1136
↓ 1 callersMethoddetect_movie
(self,sentence,movies)
dataset.py:214
↓ 1 callersMethodencode_cand
(self, words)
models/transformer.py:1054
↓ 1 callersMethodencode_context_memory
(self, context_w, memories_w)
models/transformer.py:1072
↓ 1 callersMethodinfomax_loss
(self, con_nodes_features, db_nodes_features, con_user_emb, db_user_emb, con_label, db_label, mask)
model.py:315
↓ 1 callersMethodinit_optim
Initialize optimizer with model parameters. :param params: parameters from the model :param optim_states:
run.py:302
↓ 1 callersMethodinit_optim
Initialize optimizer with model parameters. :param params: parameters from the model :param optim_states:
run.py:615
↓ 1 callersFunctionkaiming_reset_parameters
(linear_module)
models/graph.py:14
↓ 1 callersMethodmetrics_cal_gen
(self,rec_loss,preds,responses,recs)
run.py:512
↓ 1 callersMethodmetrics_cal_rec
(self,rec_loss,scores,labels)
run.py:225
↓ 1 callersFunctionneginf
Returns a representable finite number near -inf for a dtype.
models/utils.py:24
↓ 1 callersMethodoptim_opts
Fetch optimizer selection. By default, collects everything in torch.optim, as well as importing: - qhm / qhmadam if inst
run.py:273
↓ 1 callersMethodoptim_opts
Fetch optimizer selection. By default, collects everything in torch.optim, as well as importing: - qhm / qhmadam if inst
run.py:586
↓ 1 callersMethodpadding_context
(self,contexts,pad=0,transformer=True)
dataset.py:101
↓ 1 callersMethodreset_parameters
(self)
models/graph.py:37
↓ 1 callersMethodresponse_delibration
(self,response,unk='MASKED_WORD')
dataset.py:127
↓ 1 callersFunctionsetup_args
()
run.py:54
↓ 1 callersMethodupdate_params
Perform step of optimization, clipping gradients and adjusting LR schedule if needed. Gradient accumulation is also performed if ag
run.py:649
↓ 1 callersMethodzero_grad
Zero out optimizer. It is recommended you call this in train_step. It automatically handles gradient accumulation if age
run.py:672
Method__getitem__
movie_vec = np.zeros(self.entity_num, dtype=np.float) context, c_lengths, response, r_length, entity, movie, concept_mask, dbpedia_
dataset.py:307
Method__init__
(self, opt, is_finetune)
run.py:99
Method__init__
(self, opt, is_finetune)
run.py:369
Method__init__
(self,filename,opt)
dataset.py:12
Method__init__
(self, dataset, entity_num, concept_num)
dataset.py:302
Method__init__
(self, opt, dictionary, is_finetune=False, padding_idx=0, start_idx=1, end_idx=2, longest_label=1)
model.py:71
Method__init__
(self, in_features, out_features, bias=True)
models/graph.py:26
Method__init__
(self, in_features, out_features, dropout, alpha, concat=True)
models/graph.py:79
Method__init__
(self, dim, da, alpha=0.2, dropout=0.5)
models/graph.py:116
Method__init__
(self, dim, da, alpha=0.2, dropout=0.5)
models/graph.py:142
Method__init__
(self, dim, da)
models/graph.py:172
Method__init__
(self, input_size, dropout)
models/graph.py:193
Method__init__
Dense version of GAT.
models/graph.py:221
Method__init__
(self, in_features, out_features, dropout, alpha, concat=True)
models/graph.py:270
Method__init__
Sparse version of GAT.
models/graph.py:331
Method__init__
(self, n_heads, dim, dropout=0)
models/transformer.py:150
Method__init__
(self, dim, dim_hidden, relu_dropout=0)
models/transformer.py:233
Method__init__
(self, transformer, hdim)
models/transformer.py:250
Method__init__
( self, n_heads, n_layers, embedding_size, ffn_size, dro
models/transformer.py:289
Method__init__
( self, n_heads, embedding_size, ffn_size, attention_dropout=0.0,
models/transformer.py:367
Method__init__
( self, n_heads, n_layers, embedding_size, ffn_size, voc
models/transformer.py:422
Method__init__
( self, n_heads, n_layers, embedding_size, ffn_size, voc
models/transformer.py:544
Method__init__
( self, n_heads, embedding_size, ffn_size, attention_dropout=0.0,
models/transformer.py:644
Method__init__
( self, n_heads, n_layers, embedding_size, ffn_size, voc
models/transformer.py:736
Method__init__
( self, n_heads, embedding_size, ffn_size, attention_dropout=0.0,
models/transformer.py:804
Method__init__
( self, n_heads, n_layers, embedding_size, ffn_size, voc
models/transformer.py:928
Method__init__
(self, opt, dictionary)
models/transformer.py:999
Method__init__
( self, padding_idx=0, start_idx=1, end_idx=2, unknown_idx=3,
models/transformer.py:1117
Method__len__
(self)
dataset.py:336
Method__repr__
(self)
models/graph.py:53
Method__repr__
(self)
models/graph.py:112
Method__repr__
(self)
models/graph.py:327
Function_add_neighbors
(kg, g, seed_set, hop)
models/graph.py:364
Function_build_decoder
(opt, dictionary, embedding=None, padding_idx=None, n_positions=1024)
models/transformer.py:78
Function_build_encoder4kg
(opt, padding_idx=None, reduction=True, n_positions=1024)
models/transformer.py:42
Function_build_encoder_mask
(opt, dictionary, embedding=None, padding_idx=None, reduction=True, n_positions=1024)
models/transformer.py:59
Function_load_kg_embeddings
(entity2entityId, dim, embedding_path)
model.py:15
Methodbackward
(ctx, grad_output)
models/graph.py:250
Methodbleu_cal
(sen1, tar1)
run.py:513
Methodco_occurance_ext
(self,data)
dataset.py:160
Methoddistinct_metrics
(outs)
run.py:520
Methodentities2ids
(self,entities)
dataset.py:211
Methodforward
Get output predictions from the model. :param xs: input to the encoder :type xs: LongTensor[bs
model.py:328
Methodforward
(self, input, adj)
models/graph.py:45
Methodforward
x: shape (|V|, |D|); adj: shape(|V|, |V|)
models/graph.py:66
Methodforward
(self, input, adj)
models/graph.py:94
Methodforward
(self, h)
models/graph.py:130
next →1–100 of 130, ranked by callers