Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
zshiqiang authored Dec 9, 2024
1 parent fa7e870 commit 494149c
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions docs/notebooks/neuralnet/graph_neural_network_formulation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,17 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import torch\n",
"from torch.nn import Linear, ReLU, Sigmoid\n",
"from torch_geometric.nn import Sequential, GCNConv\n",
"from torch_geometric.nn import global_mean_pool\n",
"from omlt.io.torch_geometric import gnn_with_fixed_graph\n",
"import pyomo.environ as pyo\n",
"import torch\n",
"from omlt import OmltBlock\n",
"from omlt.io.torch_geometric import gnn_with_fixed_graph\n",
"from torch.nn import Linear, ReLU, Sigmoid\n",
"from torch_geometric.nn import GCNConv, Sequential, global_mean_pool\n",
"\n",
"\n",
"def GCN_Sequential(activation, pooling):\n",
Expand All @@ -68,7 +67,7 @@
" activation(),\n",
" Linear(2, 1),\n",
" ],\n",
" )\n"
" )"
]
},
{
Expand Down Expand Up @@ -485,19 +484,17 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import torch\n",
"from torch.nn import Linear, ReLU\n",
"from torch_geometric.nn import Sequential, SAGEConv\n",
"from torch_geometric.nn import global_add_pool\n",
"from omlt.io.torch_geometric import gnn_with_non_fixed_graph\n",
"\n",
"import pyomo.environ as pyo\n",
"import torch\n",
"from omlt import OmltBlock\n",
"from omlt.io.torch_geometric import gnn_with_non_fixed_graph\n",
"from torch.nn import Linear, ReLU\n",
"from torch_geometric.nn import SAGEConv, Sequential, global_add_pool\n",
"\n",
"\n",
"def SAGE_Sequential(activation, pooling):\n",
Expand Down

0 comments on commit 494149c

Please sign in to comment.