Unverified Commit 009722a6 authored by Yuge Zhang's avatar Yuge Zhang Committed by GitHub
Browse files

Revert notebook example to base execution engine (#3852)

parent ef15fc81
......@@ -55,7 +55,7 @@
"\n",
"class Net(nn.Module):\n",
" def __init__(self):\n",
" super(Net, self).__init__()\n",
" super().__init__()\n",
" self.conv1 = nn.Conv2d(3, 6, 3, padding=1)\n",
" self.pool = nn.MaxPool2d(2, 2)\n",
" self.conv2 = nn.Conv2d(6, 16, 3, padding=1)\n",
......@@ -109,12 +109,10 @@
"source": [
"import torch.nn.functional as F\n",
"import nni.retiarii.nn.pytorch as nn\n",
"from nni.retiarii import model_wrapper\n",
"\n",
"@model_wrapper\n",
"class Net(nn.Module):\n",
" def __init__(self):\n",
" super(Net, self).__init__()\n",
" super().__init__()\n",
" # self.conv1 = nn.Conv2d(3, 6, 3, padding=1)\n",
" self.conv1 = nn.LayerChoice([nn.Conv2d(3, 6, 3, padding=1), nn.Conv2d(3, 6, 5, padding=2)])\n",
" self.pool = nn.MaxPool2d(2, 2)\n",
......@@ -304,6 +302,7 @@
"exp_config.max_trial_number = 10\n",
"exp_config.trial_gpu_number = 2\n",
"exp_config.max_experiment_duration = '5m'\n",
"exp_config.execution_engine = 'base'\n",
"exp_config.training_service.use_active_gpu = True"
]
},
......
......@@ -127,9 +127,7 @@
"source": [
"import nni.retiarii.nn.pytorch as nn\n",
"import torch.nn.functional as F\n",
"from nni.retiarii import model_wrapper\n",
"\n",
"@model_wrapper\n",
"class Net(nn.Module):\n",
"\n",
" def __init__(self, input_size):\n",
......@@ -287,6 +285,7 @@
"exp_config.trial_concurrency = 2\n",
"exp_config.max_trial_number = 20\n",
"exp_config.max_experiment_duration = '2h'\n",
"exp_config.execution_engine = 'base'\n",
"exp_config.nni_manager_ip = '' # your nni_manager_ip"
]
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment