def forward(self, graph, ufeat, ifeat):
        """Forward function.

        Parameters
        ----------
        graph : DGLGraph
            "Flattened" user-movie graph with only one edge type.
        ufeat : th.Tensor
            User embeddings. Shape: (|V_u|, D)
        ifeat : th.Tensor
            Movie embeddings. Shape: (|V_m|, D)

        Returns
        -------
        th.Tensor
            Predicting scores for each user-movie edge.
        """
        with graph.local_scope():
            ufeat = self.dropout(ufeat)
            ifeat = self.dropout(ifeat)
            graph.nodes["movie"].data["h"] = ifeat
            basis_out = []
            for i in range(self._num_basis):
                graph.nodes["user"].data["h"] = ufeat @ self.Ps[i]
                graph.apply_edges(fn.u_dot_v("h", "h", "sr"))
                basis_out.append(graph.edata["sr"])
            out = th.cat(basis_out, dim=1)
            out = self.combine_basis(out)
        return out
Forward function.

        Parameters
        ----------
        graph : DGLGraph
            "Flattened" user-movie graph with only one edge type.
        ufeat : th.Tensor
            User embeddings. Shape: (|V_u|, D)
        ifeat : th.Tensor
            Movie embeddings. Shape: (|V_m|, D)

        Returns
        -------
        th.Tensor
            Predicting scores for each user-movie edge.
        
examples/pytorch/gcmc/model.py