Fix inor typos in chap 8 notebooks

This commit is contained in:
Youcef Rahal
2024-04-05 08:42:10 -04:00
parent 4652f90f09
commit a5413d6a15
4 changed files with 11 additions and 11 deletions

View File

@@ -124,7 +124,7 @@
" D_k = n_hidden # Hidden dimensions\n",
" D_o = 10 # Output dimensions\n",
"\n",
" # Define a model with two hidden layers of size 100\n",
" # Define a model with two hidden layers\n",
" # And ReLU activations between them\n",
" model = nn.Sequential(\n",
" nn.Linear(D_i, D_k),\n",
@@ -157,7 +157,6 @@
" optimizer = torch.optim.SGD(model.parameters(), lr = 0.01, momentum=0.9)\n",
"\n",
"\n",
" # create 100 dummy data points and store in data loader class\n",
" x_train = torch.tensor(data['x'].astype('float32'))\n",
" y_train = torch.tensor(data['y'].transpose().astype('long'))\n",
" x_test= torch.tensor(data['x_test'].astype('float32'))\n",
@@ -267,4 +266,4 @@
"outputs": []
}
]
}
}