ggfm.models.PT_HGNN

class ggfm.models.PT_HGNN(gnn, rem_edge_list, attr_decoder, types, neg_samp_num, device, neg_queue_size=0)[source]

PT-HGNN the model for heterogeneous graph neural network with pre-training. Composed of a GNN, a link prediction decoder, an attribute prediction decoder, and a text prediction decoder.

feat_loss(reps, out)[source]
forward(node_feature, node_type, edge_time, edge_index, edge_type)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

neg_sample(souce_node_list, pos_node_list)[source]
neg_sample_ori(souce_node_list, pos_node_list)[source]
structure_loss(node_emb, rem_edge_list, ori_edge_list, node_dict, target_type, use_queue=True, update_queue=False, relation_level=False)[source]
text_loss(reps, texts, w2v_model, device)[source]
training: bool