Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
saitcakmak committed Jan 10, 2025
1 parent 04e5091 commit 693cc18
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tutorials/test3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"outputs": [],
"source": [
"# %%time\n",
"%%time\n",
"import torch\n",
"import numpy as np\n",
"from scipy.optimize import minimize, Bounds\n",
Expand Down Expand Up @@ -71,17 +71,18 @@
"\n",
"sortby = SortKey.CUMULATIVE\n",
"ps = pstats.Stats(pr).sort_stats(sortby)\n",
"ps.print_stats()\n",
"ps.print_stats(.1)\n",
"None"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "70b96c61",
"id": "5192e9a6",
"metadata": {},
"outputs": [],
"source": [
"%%time\n",
"def f_and_grad(x):\n",
" X_tensor = torch.from_numpy(x.reshape((16, 4, 2))).contiguous().requires_grad_(True)\n",
" loss = acqf._get_samples_and_objectives(X_tensor)[1].sum()\n",
Expand All @@ -100,7 +101,7 @@
"\n",
"sortby = SortKey.CUMULATIVE\n",
"ps = pstats.Stats(pr).sort_stats(sortby)\n",
"ps.print_stats()\n",
"ps.print_stats(.1)\n",
"None"
]
}
Expand Down

0 comments on commit 693cc18

Please sign in to comment.