r"""Return the smoothed feature matrix with GCN Laplacian matrix :math:`\mathcal{L}_{GCN}`. Args: ``X`` (``torch.Tensor``): Vertex feature matrix. Size :math:`(|\mathcal{V}|, C)`. ``drop_rate`` (``float``): Dropout rate. Randomly dropout the connections in adjacency
(self, X, drop_rate=0.0)
| 496 | return self.cache["L_GCN"] |
| 497 | |
| 498 | def smoothing_with_GCN(self, X, drop_rate=0.0): |
| 499 | r"""Return the smoothed feature matrix with GCN Laplacian matrix :math:`\mathcal{L}_{GCN}`. |
| 500 | |
| 501 | Args: |
| 502 | ``X`` (``torch.Tensor``): Vertex feature matrix. Size :math:`(|\mathcal{V}|, C)`. |
| 503 | ``drop_rate`` (``float``): Dropout rate. Randomly dropout the connections in adjacency matrix with probability ``drop_rate``. Default: ``0.0``. |
| 504 | """ |
| 505 | if drop_rate > 0.0: |
| 506 | L_GCN = sparse_dropout(self.L_GCN, drop_rate) |
| 507 | else: |
| 508 | L_GCN = self.L_GCN |
| 509 | return L_GCN.mm(X) |
| 510 | |
| 511 | def number_of_edges(self, u=None, v=None): |
| 512 | """Returns the number of edges between two nodes. |
no test coverage detected