Skip to content

Commit

Permalink
Created using Colaboratory
Browse files Browse the repository at this point in the history
  • Loading branch information
udlbook committed Dec 17, 2023
1 parent 905d7d1 commit 2e343bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Notebooks/Chap10/10_2_Convolution_for_MNIST_1D.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyN1qtywBuyezaVMnc9MI7x2",
"authorship_tag": "ABX9TyNJodaaCLMRWL9vTl8B/iLI",
"include_colab_link": true
},
"kernelspec": {
Expand Down Expand Up @@ -188,9 +188,9 @@
"scheduler = StepLR(optimizer, step_size=20, gamma=0.5)\n",
"# create 100 dummy data points and store in data loader class\n",
"x_train = torch.tensor(train_data_x.transpose().astype('float32'))\n",
"y_train = torch.tensor(train_data_y.astype('long'))\n",
"y_train = torch.tensor(train_data_y.astype('long')).long()\n",
"x_val= torch.tensor(val_data_x.transpose().astype('float32'))\n",
"y_val = torch.tensor(val_data_y.astype('long'))\n",
"y_val = torch.tensor(val_data_y.astype('long')).long()\n",
"\n",
"# load the data into a class that creates the batches\n",
"data_loader = DataLoader(TensorDataset(x_train,y_train), batch_size=100, shuffle=True, worker_init_fn=np.random.seed(1))\n",
Expand Down

0 comments on commit 2e343bc

Please sign in to comment.