Skip to content

Commit

Permalink
minor docs change and C&S fix for multilabel tasks (#4985)
Browse files Browse the repository at this point in the history
  • Loading branch information
kswhitecross authored Jul 15, 2022
1 parent f16fa11 commit b571ae5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions torch_geometric/loader/neighbor_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,10 @@ class NeighborLoader(torch.utils.data.DataLoader):
**homogeneous** graphs stored via :class:`~torch_geometric.data.Data` as
well as **heterogeneous** graphs stored via
:class:`~torch_geometric.data.HeteroData`.
When operating in heterogeneous graphs, more fine-grained control over
the amount of sampled neighbors of individual edge types is possible, but
not necessary:
When operating in heterogeneous graphs, up to :obj:`num_neighbors`
neighbors will be sampled for each :obj:`edge_type`.
However, more fine-grained control over
the amount of sampled neighbors of individual edge types is possible:
.. code-block:: python
Expand Down
1 change: 0 additions & 1 deletion torch_geometric/nn/models/correct_and_smooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def correct(self, y_soft: Tensor, y_true: Tensor, mask: Tensor,
edge_weight (Tensor, optional): The edge weights.
(default: :obj:`None`)
"""
assert abs((float(y_soft.sum()) / y_soft.size(0)) - 1.0) < 1e-2

numel = int(mask.sum()) if mask.dtype == torch.bool else mask.size(0)
assert y_true.size(0) == numel
Expand Down

0 comments on commit b571ae5

Please sign in to comment.