H2GB.encoder.HeteroPENodeEncoder

class HeteroPENodeEncoder(dim_emb, dataset, reshape_x=True)[source]

Bases: Module

Configurable Positional Encoding node encoder.

PE of size dim_pe will get appended to each node feature vector. If reshape_x set True, original node features will be first linearly projected to (dim_emb - dim_pe) size and the concatenated with PE.

Parameters:
  • dim_emb – Size of final node embedding

  • reshape_x – Reshape node features x from dim_in to (dim_emb - dim_pe)