Skip to content

Commit

Permalink
Fix import of Simplicial Complex: import from toponetx.class.simplici…
Browse files Browse the repository at this point in the history
…al_complex
  • Loading branch information
ninamiolane committed Aug 24, 2023
1 parent 1afe5b1 commit d65d3e8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
7 changes: 0 additions & 7 deletions tutorials/hypergraph/dhgcn_train.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,6 @@
"y_train, y_test = train_test_split(ys, test_size=test_size, shuffle=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"attachments": {},
"cell_type": "markdown",
Expand Down
11 changes: 5 additions & 6 deletions tutorials/hypergraph/unigin_train.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -11,7 +11,7 @@
"from sklearn.model_selection import train_test_split\n",
"from torch_geometric.datasets import TUDataset\n",
"from torch_geometric.utils.convert import to_networkx\n",
"from toponetx import SimplicialComplex\n",
"from toponetx.classes.simplicial_complex import SimplicialComplex\n",
"from topomodelx.nn.hypergraph.unigin_layer import UniGINLayer"
]
},
Expand Down Expand Up @@ -365,7 +365,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "TNN",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -380,9 +380,8 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
},
"orig_nbformat": 4
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
32 changes: 26 additions & 6 deletions tutorials/hypergraph/unisage_train.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"id": "babbfc35",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"source": [
"%load_ext autoreload\n",
"%autoreload 2\n",
Expand All @@ -15,7 +24,7 @@
"from sklearn.model_selection import train_test_split\n",
"from torch_geometric.datasets import TUDataset\n",
"from torch_geometric.utils.convert import to_networkx\n",
"from toponetx import SimplicialComplex\n",
"from toponetx.classes.simplicial_complex import SimplicialComplex\n",
"from topomodelx.nn.hypergraph.unisage_layer import UniSAGELayer\n",
"import warnings\n",
"\n",
Expand All @@ -40,10 +49,21 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"id": "b9e6b0d0",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading https://www.chrsmrrs.com/graphkerneldatasets/MUTAG.zip\n",
"Extracting /tmp/MUTAG/MUTAG/MUTAG.zip\n",
"Processing...\n",
"Done!\n"
]
}
],
"source": [
"dataset = TUDataset(root=\"/tmp/MUTAG\", name=\"MUTAG\", use_edge_attr=True)\n",
"dataset = dataset[:100]\n",
Expand Down Expand Up @@ -365,7 +385,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.11.3"
}
},
"nbformat": 4,
Expand Down

0 comments on commit d65d3e8

Please sign in to comment.