forked from pyg-team/pytorch_geometric
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…eam#8404) I needed to use the `FakeDataset` for checking something in a randomly generated graph that was identical in "size" to a real graph (cora/citeseer), in which the `avg_degree` is usually not an integer. So, I decided to extend the `FakeDataset` and `FakeHeteroDataset` to float. I've tried to make sure other things don't mess up because of this by using `int(avg_degree)` where I felt it was necessary. Also, I noticed a small thing: inside `FakeDataset` L62 and L63 are switched, and inside `FakeHeteroDataset` L174 and L175 are switched, whereas it should be checking whether `avg_degree` is < 1 before using it to find `avg_num_nodes`. It wont make a difference anyway, the only time that would matter is when `avg_degree` changed after using it's value, which will happen only when it is < 1, in which case the previous `max(avg_num_nodes, avg_degree)` should come out to be the former, which _should_ be >= 1. There are no checks for any of this though, if needed, I would be glad to add those checks. --------- Co-authored-by: rusty1s <[email protected]>
- Loading branch information
1 parent
362fe90
commit c7483ac
Showing
2 changed files
with
21 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters