diff --git a/tutorial.ipynb b/tutorial.ipynb index e1b1a75..9521046 100644 --- a/tutorial.ipynb +++ b/tutorial.ipynb @@ -1188,6 +1188,22 @@ "execution_count": null, "outputs": [] }, + { + "cell_type": "code", + "metadata": { + "id": "gogI-kwi3Tye" + }, + "source": [ + "# Profile\n", + "from utils.torch_utils import profile \n", + "\n", + "m1 = lambda x: x * torch.sigmoid(x)\n", + "m2 = torch.nn.SiLU()\n", + "profile(x=torch.randn(16, 3, 640, 640), [m1, m2], n=100)" + ], + "execution_count": null, + "outputs": [] + }, { "cell_type": "code", "metadata": { @@ -1202,4 +1218,4 @@ "outputs": [] } ] -} +} \ No newline at end of file