NGCF

class dhg.models.NGCF(*args, **kwargs)[source]

Bases: torch.nn.Module

The NGCF model proposed in Neural Graph Collaborative Filtering paper (SIGIR 2019).

Note

The user and item embeddings and trainable parameters are initialized with xavier_uniform distribution.

Parameters
  • num_users (int) – The Number of users.

  • num_items (int) – The Number of items.

  • emb_dim (int) – Embedding dimension.

  • num_layers (int) – The Number of layers. Defaults to 3.

  • drop_rate (float) – The dropout probability. Defaults to 0.5.

forward(ui_bigraph)[source]

The forward function.

Parameters

ui_bigraph (dhg.BiGraph) – The user-item bipartite graph.