Browse Source

[MNT] improve MNIST performance

pull/1/head
Gao Enhao 2 years ago
parent
commit
fb059e5bda
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      examples/mnist_add/mnist_add.ipynb

+ 5
- 5
examples/mnist_add/mnist_add.ipynb View File

@@ -181,7 +181,7 @@
"source": [
"cls = LeNet5(num_classes=10)\n",
"loss_fn = nn.CrossEntropyLoss()\n",
"optimizer = torch.optim.Adam(cls.parameters(), lr=0.001)\n",
"optimizer = torch.optim.RMSprop(cls.parameters(), lr=0.001, alpha=0.9)\n",
"device = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\n",
"\n",
"base_model = BasicNN(\n",
@@ -357,7 +357,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -390,7 +390,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -409,7 +409,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -455,7 +455,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.8.18"
},
"orig_nbformat": 4,
"vscode": {


Loading…
Cancel
Save