train_loader subgraphs data from Neighborloader not corresponding with the data from the graph #9237
Replies: 2 comments 4 replies
-
Can you show me the output of |
Beta Was this translation helpful? Give feedback.
-
This is the one for OGB_MAG data hetero_data = OGB_MAG(path)[0] This is the subgraph data for OGB data, and it has almost similar properties like mine, but i don't know if i'm on track or that the way neighborloader splits the data to subgraphs? |
Beta Was this translation helpful? Give feedback.
-
import networkx as nx
import pandas as pd
from collections import defaultdict
import torch
from torch_geometric.data import Data, HeteroData
import gensim.downloader as api
from gensim.models import Word2Vec
from sklearn.preprocessing import StandardScaler, OneHotEncoder
from torch_geometric.loader import NeighborLoader
import torch_geometric.transforms as T
from torch_geometric.transforms import RandomNodeSplit
Load pre-trained Word2Vec model
Shape of data['user'].x: torch.Size([583, 53])
User to Restaurant Edge Index shape: torch.Size([2, 3669])
User to Restaurant Edge Weight shape: torch.Size([592])
User to Categories Edge Weight shape: torch.Size([3077])
User to Categories Edge Index shape: torch.Size([2, 3669])
User to Restaurant Edge Attribute shape: torch.Size([3669, 50])
Im having issues with the train_loader, since it the num_nodes for restaurants and categories are 0, but the data for the combine_data is showing the exact data as it should. and the train_loader has the same data for all subgraphs?. i need help?.
This is the subgrahs data:
User to Restaurant Edge Index shape: tensor([], size=(2, 0), dtype=torch.int64)
User to Categories Edge Index shape: tensor([], size=(2, 0), dtype=torch.int64)
Beta Was this translation helpful? Give feedback.
All reactions