Search is not available for this dataset
x
listlengths 198
500
| edge_index
listlengths 2
2
| edge_attr
listlengths 1.04k
2.94k
| y
listlengths 198
500
| neuralwalker_embeddings
listlengths 198
500
|
|---|---|---|---|---|
[[2.0874507427215576,2.183112859725952,2.1908414363861084,-1.2392337322235107,-1.205312728881836,-1.(...TRUNCATED)
| [[0,0,0,1,1,1,1,32,32,32,32,32,32,32,34,34,34,2,2,2,2,28,28,28,28,28,3,3,3,3,3,29,29,29,29,29,29,4,4(...TRUNCATED)
| [[-0.8794848322868347,0.06040659174323082],[-0.8794848322868347,-0.8467278480529785],[-0.87948483228(...TRUNCATED)
| [0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,0,0,0,0,20,20,20,20(...TRUNCATED)
| [[-0.020212974399328232,0.3243827819824219,-0.5966533422470093,1.5094374418258667,-2.420851230621338(...TRUNCATED)
|
[[2.076162099838257,2.1793155670166016,2.1890416145324707,-1.157196044921875,-1.1533794403076172,-1.(...TRUNCATED)
| [[0,0,0,1,1,1,1,28,28,28,28,29,29,29,29,29,29,2,2,2,2,30,30,30,30,30,30,3,3,3,3,31,31,31,31,31,4,4,4(...TRUNCATED)
| [[-0.8449783325195312,0.346870094537735],[-0.8758953213691711,0.346870094537735],[-0.878285825252533(...TRUNCATED)
| [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
| [[1.514174222946167,-0.026109399273991585,1.8233485221862793,-0.36820635199546814,-2.017379522323608(...TRUNCATED)
|
[[-0.3640260100364685,0.11923809349536896,0.5098802447319031,-0.05243488773703575,0.0315544456243515(...TRUNCATED)
| [[0,0,1,1,1,1,32,32,32,32,32,2,2,2,2,2,33,33,33,33,33,3,3,3,3,29,29,29,29,29,41,41,41,41,41,41,4,4,4(...TRUNCATED)
| [[-0.7422237396240234,-0.08282516151666641],[-0.5887258052825928,0.39461401104927063],[-0.7422237396(...TRUNCATED)
| [0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,0,5,5,5,5,0,0,5,0,5,5,5,0,0,0,0,0,5,5,5,0,0,0(...TRUNCATED)
| [[-0.6597114205360413,-1.9076725244522095,-0.6409578323364258,1.7198768854141235,-0.5895625352859497(...TRUNCATED)
|
[[-0.0686446949839592,-0.8979844450950623,-0.9078682065010071,0.20474198460578918,-0.173655614256858(...TRUNCATED)
| [[0,0,0,1,1,1,1,1,24,24,24,26,26,26,26,26,26,2,2,2,2,30,30,30,30,30,31,31,31,31,31,31,31,3,3,3,3,25,(...TRUNCATED)
| [[-0.34713247418403625,-0.3215447664260864],[0.9629385471343994,1.2062606811523438],[1.3452612161636(...TRUNCATED)
| [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,20,0,0,0,2(...TRUNCATED)
| [[-0.3861831724643707,-1.247888445854187,-0.6301489472389221,0.6782509684562683,-1.0719116926193237,(...TRUNCATED)
|
[[-0.5267679691314697,-0.34878867864608765,-0.11913034319877625,-0.8117189407348633,-0.7747080326080(...TRUNCATED)
| [[0,0,0,1,1,1,1,46,46,46,46,47,47,47,47,47,47,2,2,2,2,48,48,48,48,48,48,3,3,3,3,49,49,49,49,49,49,4,(...TRUNCATED)
| [[-0.6836878061294556,-0.03508124500513077],[-0.6890510320663452,-0.03508124500513077],[-0.706869125(...TRUNCATED)
| [0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,12,12,0,0,12,12,12,0,12,12,0,0,12,0,12,(...TRUNCATED)
| [[-0.2776763141155243,-0.19345618784427643,0.6572044491767883,0.4313511848449707,-0.769223153591156,(...TRUNCATED)
|
[[0.15900586545467377,-0.827258288860321,-1.216524362564087,-0.023488573729991913,-0.468014299869537(...TRUNCATED)
| [[0,0,1,1,1,1,21,21,21,21,2,2,2,2,22,22,22,22,22,22,3,3,3,3,24,24,24,24,24,24,24,4,4,4,4,4,23,23,23,(...TRUNCATED)
| [[-0.7131530046463013,-0.4170325994491577],[-0.12625263631343842,0.7288214564323425],[-0.71315300464(...TRUNCATED)
| [0,0,20,20,0,0,0,20,20,20,20,20,20,20,20,20,0,20,20,20,20,0,20,20,20,20,20,20,20,20,20,0,20,20,20,20(...TRUNCATED)
| [[0.1909739226102829,0.6081895232200623,-0.1646905392408371,0.31184306740760803,-1.3373019695281982,(...TRUNCATED)
|
[[1.1354575157165527,1.2679448127746582,1.2207791805267334,1.8313021659851074,1.8313475847244263,1.8(...TRUNCATED)
| [[0,0,0,1,1,1,1,25,25,25,25,25,25,25,41,41,41,2,2,2,2,2,26,26,26,26,26,3,3,3,31,31,31,31,31,31,31,31(...TRUNCATED)
| [[1.7564938068389893,-0.03508124500513077],[0.29384759068489075,-0.7034960985183716],[0.263747662305(...TRUNCATED)
| [0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,(...TRUNCATED)
| [[-0.06349672377109528,-0.0667559802532196,0.4279768466949463,2.165250301361084,-1.2623487710952759,(...TRUNCATED)
|
[[1.6509636640548706,1.9153976440429688,2.027064800262451,0.5465311408042908,-0.07105058431625366,-0(...TRUNCATED)
| [[0,0,1,1,1,1,1,55,55,55,2,2,2,2,48,48,48,48,48,59,59,59,59,59,59,59,3,3,3,3,30,30,30,30,30,4,4,4,4,(...TRUNCATED)
| [[4.451972484588623,2.4953465461730957],[0.06995325535535812,-0.9422156810760498],[4.451972484588623(...TRUNCATED)
| [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
| [[0.06580688804388046,-0.12692515552043915,1.358880877494812,0.6098755598068237,-1.2163817882537842,(...TRUNCATED)
|
[[0.39041924476623535,0.8255503177642822,0.4072948396205902,1.058658242225647,1.1091876029968262,0.8(...TRUNCATED)
| [[0,0,0,1,1,1,1,30,30,30,30,30,30,38,38,38,38,2,2,2,2,43,43,43,43,43,43,3,3,3,3,39,39,39,39,39,39,4,(...TRUNCATED)
| [[0.7446914911270142,2.1611390113830566],[0.35327306389808655,0.06040659174323082],[0.40687170624732(...TRUNCATED)
| [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
| [[1.1664119958877563,0.14608439803123474,2.2650554180145264,0.7394785284996033,-2.219876766204834,-1(...TRUNCATED)
|
[[-1.7079110145568848,-0.09436438977718353,1.6221221685409546,-1.0377228260040283,-0.953425765037536(...TRUNCATED)
| [[0,0,0,1,1,1,1,28,28,28,28,29,29,29,29,29,29,2,2,2,2,30,30,30,30,30,30,3,3,3,3,31,31,31,31,31,31,4,(...TRUNCATED)
| [[-0.7999609708786011,0.1558944284915924],[-0.8102980256080627,0.1558944284915924],[-0.8101806044578(...TRUNCATED)
| [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
| [[0.827446460723877,-0.4732629060745239,1.3154661655426025,-0.011174709536135197,-0.8642206192016602(...TRUNCATED)
|
End of preview. Expand
in Data Studio
import torch
from datasets import load_dataset
from torch_geometric.data import Data, Batch
from tqdm import tqdm
# Load the HuggingFace dataset from hub
hf_dataset = load_dataset("samm393/lrgb-pascalvoc-neuralwalker")
# Load multiple graphs
num_graphs = 10
# Convert each to PyG Data object
pyg_graphs = []
for i in tqdm(range(num_graphs), desc="Loading graphs"):
hf_row = hf_dataset['train'][i]
pyg_dict = {k: torch.tensor(v) if isinstance(v, list) else v for k, v in hf_row.items()}
pyg_data = Data.from_dict(pyg_dict)
pyg_graphs.append(pyg_data)
# Create a batch object
batch = Batch.from_data_list(pyg_graphs)
print(f"Batch object: {batch}")
print(f"Total nodes in batch: {batch.num_nodes}")
print(f"Total edges in batch: {batch.num_edges}")
print(f"Number of graphs in batch: {batch.num_graphs}")
print(f"Batch tensor shape: {batch.batch.shape}") # Maps each node to its graph
print(f"Batched features shape: {batch.x.shape}")
print(f"Batched NeuralWalker embeddings shape: {batch.neuralwalker_embeddings.shape}")
Batch object: DataBatch(x=[4827, 14], edge_index=[2, 27318], edge_attr=[27318, 2], y=[4827], neuralwalker_embeddings=[4827, 56], batch=[4827], ptr=[11])
Total nodes in batch: 4827
Total edges in batch: 27318
Number of graphs in batch: 10
Batch tensor shape: torch.Size([4827])
Batched features shape: torch.Size([4827, 14])
Batched NeuralWalker embeddings shape: torch.Size([4827, 56])
- Downloads last month
- 9