Profile() feature addition
This commit is contained in:
parent
ada90e3901
commit
bc52ea2d5f
|
|
@ -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": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue