cogdl.models.emb.hin2vec
¶
Module Contents¶
Classes¶
The Hin2vec model from the `”HIN2Vec: Explore Meta-paths in Heterogeneous Information Networks for Representation Learning” |
-
class
cogdl.models.emb.hin2vec.
Hin2vec_layer
(num_node, num_relation, hidden_size, cpu)[source]¶ Bases:
torch.nn.Module
-
class
cogdl.models.emb.hin2vec.
Hin2vec
(hidden_dim, walk_length, walk_num, batch_size, hop, negative, epochs, lr, cpu=True)[source]¶ Bases:
cogdl.models.BaseModel
The Hin2vec model from the “HIN2Vec: Explore Meta-paths in Heterogeneous Information Networks for Representation Learning” paper.
- Args:
hidden_size (int) : The dimension of node representation. walk_length (int) : The walk length. walk_num (int) : The number of walks to sample for each node. batch_size (int) : The batch size of training in Hin2vec. hop (int) : The number of hop to construct training samples in Hin2vec. negative (int) : The number of nagative samples for each meta2path pair. epochs (int) : The number of training iteration. lr (float) : The initial learning rate of SGD. cpu (bool) : Use CPU or GPU to train hin2vec.