Skip to content

Commit

Permalink
fix error in channel mutator doc
Browse files Browse the repository at this point in the history
  • Loading branch information
liukai committed Oct 31, 2022
1 parent c6212c2 commit 1b1361b
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions mmrazor/models/mutators/channel_mutator/channel_mutator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -63,7 +63,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 25,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -116,7 +116,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 26,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -175,7 +175,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 27,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -258,19 +258,19 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 28,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'net.conv0_(0, 8)_8': 8, 'net.conv1_(0, 16)_16': 16}\n"
"{0: 8, 1: 16}\n"
]
}
],
"source": [
"print(mutator.choice_template)"
"print(mutator.current_choices)"
]
},
{
Expand All @@ -282,7 +282,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 29,
"metadata": {},
"outputs": [
{
Expand All @@ -296,14 +296,14 @@
" 3, 8, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)\n",
" (mutable_attrs): ModuleDict(\n",
" (in_channels): MutableChannelContainer(num_channels=3, activated_channels=3)\n",
" (out_channels): MutableChannelContainer(num_channels=8, activated_channels=6)\n",
" (out_channels): MutableChannelContainer(num_channels=8, activated_channels=4)\n",
" )\n",
" )\n",
" (relu): ReLU()\n",
" (conv1): DynamicConv2d(\n",
" 8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)\n",
" (mutable_attrs): ModuleDict(\n",
" (in_channels): MutableChannelContainer(num_channels=8, activated_channels=6)\n",
" (in_channels): MutableChannelContainer(num_channels=8, activated_channels=4)\n",
" (out_channels): MutableChannelContainer(num_channels=16, activated_channels=8)\n",
" )\n",
" )\n",
Expand All @@ -322,7 +322,7 @@
],
"source": [
"mutator.set_choices(\n",
" {'net.conv0_(0, 8)_8': 0.75, 'net.conv1_(0, 16)_16': 0.5}\n",
" {0: 4, 1: 8}\n",
")\n",
"print(model)"
]
Expand All @@ -337,7 +337,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9.12 ('mmlab')",
"display_name": "Python 3.9.13 ('lab2max')",
"language": "python",
"name": "python3"
},
Expand All @@ -351,12 +351,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.9.13"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "feec882ee78c63cb8d4b485f1b52bbb873bb9a7b094435863200c7afba202382"
"hash": "e31a827d0913016ad78e01c7b97f787f4b9e53102dd62d238e8548bcd97ff875"
}
}
},
Expand Down

0 comments on commit 1b1361b

Please sign in to comment.