H2GB.encoder.HeteroLabelNodeEncoder
- class HeteroLabelNodeEncoder(dim_emb, dataset, reshape_x=True)[source]
Bases:
Module
The label node encoder for masked label embedding.
Apply the one-hot encoded label vector to an embedding matrix to extract the label embedding. The label embedding is randomly masked to avoid information leakage.
- Parameters:
emb_dim (int) – Output embedding dimension
dataset (Any) – A
InMemoryDataset
dataset object.