Skip to content

Commit

Permalink
Removing a print from the dataloader that was used to debug it.
Browse files Browse the repository at this point in the history
  • Loading branch information
rballeba committed Apr 26, 2024
1 parent 4eba211 commit 147b3df
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 90 deletions.
114 changes: 25 additions & 89 deletions experiment_scconv.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,16 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-04-26T15:57:14.612479Z",
"start_time": "2024-04-26T15:57:14.576630Z"
"end_time": "2024-04-26T16:28:15.561570Z",
"start_time": "2024-04-26T16:28:15.523217Z"
}
},
"id": "e1447e3b250fa124",
"execution_count": 1
},
{
"cell_type": "code",
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'topomodelx'",
"output_type": "error",
"traceback": [
"\u001B[1;31m---------------------------------------------------------------------------\u001B[0m",
"\u001B[1;31mModuleNotFoundError\u001B[0m Traceback (most recent call last)",
"Cell \u001B[1;32mIn[35], line 7\u001B[0m\n\u001B[0;32m 5\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01mmantra\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mtransforms\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m OrientableToClassTransform, SimplicialComplexTransform\n\u001B[0;32m 6\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01mmantra\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mdataloaders\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m SimplicialDataLoader\n\u001B[1;32m----> 7\u001B[0m \u001B[38;5;28;01mfrom\u001B[39;00m \u001B[38;5;21;01mtopomodelx\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01mutils\u001B[39;00m\u001B[38;5;21;01m.\u001B[39;00m\u001B[38;5;21;01msparse\u001B[39;00m \u001B[38;5;28;01mimport\u001B[39;00m from_sparse\n",
"\u001B[1;31mModuleNotFoundError\u001B[0m: No module named 'topomodelx'"
]
}
],
"outputs": [],
"source": [
"from mantra.simplicial import SimplicialDataset\n",
"import torch\n",
Expand All @@ -44,12 +32,12 @@
"metadata": {
"collapsed": true,
"ExecuteTime": {
"end_time": "2024-04-26T16:17:56.006222Z",
"start_time": "2024-04-26T16:17:55.890296Z"
"end_time": "2024-04-26T16:28:21.920472Z",
"start_time": "2024-04-26T16:28:16.229989Z"
}
},
"id": "initial_id",
"execution_count": 35
"execution_count": 2
},
{
"cell_type": "code",
Expand Down Expand Up @@ -77,12 +65,12 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-04-26T16:16:25.339696Z",
"start_time": "2024-04-26T16:16:25.243304Z"
"end_time": "2024-04-26T16:28:22.571244Z",
"start_time": "2024-04-26T16:28:22.459092Z"
}
},
"id": "258c13ed23fc24a9",
"execution_count": 32
"execution_count": 3
},
{
"cell_type": "code",
Expand All @@ -94,90 +82,38 @@
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-04-26T16:16:25.802979Z",
"start_time": "2024-04-26T16:16:25.696147Z"
"end_time": "2024-04-26T16:28:23.596726Z",
"start_time": "2024-04-26T16:28:23.475386Z"
}
},
"id": "b7a030f18bfe7035",
"execution_count": 33
"execution_count": 4
},
{
"cell_type": "code",
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[tensor([[3.],\n",
" [3.],\n",
" [3.],\n",
" [3.]]), tensor([[4.],\n",
" [3.],\n",
" [4.],\n",
" [4.],\n",
" [3.]]), tensor([[5.],\n",
" [3.],\n",
" [4.],\n",
" [5.],\n",
" [4.],\n",
" [3.]])]\n",
"[tensor([[4., 4.],\n",
" [4., 4.],\n",
" [4., 4.],\n",
" [4., 4.],\n",
" [4., 4.],\n",
" [4., 4.]]), tensor([[5., 4.],\n",
" [6., 4.],\n",
" [6., 4.],\n",
" [5., 4.],\n",
" [5., 4.],\n",
" [5., 4.],\n",
" [6., 4.],\n",
" [5., 4.],\n",
" [5., 4.]]), tensor([[6., 4.],\n",
" [7., 4.],\n",
" [8., 4.],\n",
" [7., 4.],\n",
" [6., 4.],\n",
" [5., 4.],\n",
" [6., 4.],\n",
" [7., 4.],\n",
" [6., 4.],\n",
" [7., 4.],\n",
" [6., 4.],\n",
" [5., 4.]])]\n",
"[tensor([[3.],\n",
" [3.],\n",
" [3.],\n",
" [3.]]), tensor([[3.],\n",
" [3.],\n",
" [3.],\n",
" [3.],\n",
" [3.],\n",
" [3.]]), tensor([[3.],\n",
" [3.],\n",
" [3.],\n",
" [3.],\n",
" [3.],\n",
" [3.],\n",
" [3.],\n",
" [3.]])]\n"
]
}
],
"outputs": [],
"source": [
"# Take the first batch\n",
"batch, signals_belonging, len_batch = next(iter(dloader))"
],
"metadata": {
"collapsed": false,
"ExecuteTime": {
"end_time": "2024-04-26T16:16:32.741466Z",
"start_time": "2024-04-26T16:16:32.618291Z"
"end_time": "2024-04-26T16:28:38.535498Z",
"start_time": "2024-04-26T16:28:38.340151Z"
}
},
"id": "3220794957955b0f",
"execution_count": 34
"execution_count": 6
},
{
"cell_type": "code",
"outputs": [],
"source": [],
"metadata": {
"collapsed": false
},
"id": "d8a128eef9a65999"
}
],
"metadata": {
Expand Down
1 change: 0 additions & 1 deletion mantra/dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def __init__(


def batch_signals(signals):
print(signals)
return torch.cat(signals, dim=0)


Expand Down

0 comments on commit 147b3df

Please sign in to comment.