[GraphSage]: Is the size always the same between number of layers in SAGE and len(size) in NeighborSampler? #3799
Unanswered
udothemath
asked this question in
Q&A
Replies: 1 comment 9 replies
-
You are right. The number of hops ( A node in the computation graph actually refers to a set of neuron since each node is described by a set of features. For a GNN with input, hidden and output channels equals to 1, a circle describes both a node and a single neuron. Hope this clarifies your issues. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are three SAGEConv examples provided by pytorch geometric. I am wondering is the size of number of neighbors in dataloader always the same as number of SAGEConv layer?
For example 1: reddit, num_neighbors=[25, 10] in Neighborloader, and there are two SAGEConv in SAGE(torch.nn.Module) class.
![image](https://user-images.githubusercontent.com/10674490/147989499-41073084-3e0e-4d78-9bcc-65193810cff4.png)
![image](https://user-images.githubusercontent.com/10674490/147989523-0e3dfe2f-f459-4861-8b34-7299e8174a54.png)
Similar setting for example 2 and 3.
I can understand the SAGEConv concept of sampling from the node's neighbor, but I don't understand how this idea is implemented in neural network.
In graph, each circle means a node.
![source: https://www.arxiv-vanity.com/papers/2103.16329/](https://user-images.githubusercontent.com/10674490/147990287-47b1c6a6-7b24-4066-b03f-8e210eb38222.png)
In neural network, each circle means a neuron.
![source: https://commons.wikimedia.org/wiki/File:Neural_network.svg](https://user-images.githubusercontent.com/10674490/147990339-b48111ae-5ac0-4f7f-a4c6-b6b1179b0fae.png)
How to put these two together? Is there any good reference/visualization to explain the concept? Thanks for your help.
--
For example 2: ogbn_products_sage., sizes=[15, 10, 5] in NeighborSampler, and there are three SAGEConv in SAGE model (num_layers=3).
For example 3: graph_sage_unsup, sizes=[10, 10] in NeighborSampler, and num_layers=2 in SAGE model.
Beta Was this translation helpful? Give feedback.
All reactions