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.030918395146727562,-0.3525150418281555,0.35264331102371216,0.8931812644004822,-2.03621149063110(...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) | [[0.5875723361968994,-1.7085834741592407,1.2294062376022339,1.5398354530334473,-1.2502846717834473,0(...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.736965537071228,-1.6316688060760498,-1.0222631692886353,1.909781813621521,-0.3280676305294037,0(...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.37175723910331726,-2.0436208248138428,0.094541996717453,-0.7051829695701599,-1.6503875255584717,(...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.007930107414722443,-0.5569949150085449,0.06727948039770126,0.17757610976696014,-1.4926753044128(...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.23703615367412567,0.19565294682979584,-0.32496175169944763,0.23617665469646454,0.05757392570376(...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.9918104410171509,-0.33557501435279846,-1.127524733543396,0.9603076577186584,-0.1481022387742996(...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.38662025332450867,-0.8663527369499207,0.4125383198261261,-0.7142292857170105,-0.7634282112121582(...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) | [[0.7652739882469177,-1.1151628494262695,0.4533251225948334,-1.0617564916610718,-0.6458479166030884,(...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.9715998768806458,-1.0575227737426758,0.6371873021125793,0.8549930453300476,-1.295515537261963,-0(...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
- 2