Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions chapters/chapter_1/PyTorch_Basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You can create tensors by specifying the shape as arguments. Here is a tensor with 5 rows and 3 columns"
"You can create tensors by specifying the shape as arguments. Here is a tensor with 2 rows and 3 columns"
]
},
{
Expand Down Expand Up @@ -213,9 +213,7 @@
],
"source": [
"x = torch.Tensor(3,4).fill_(5)\n",
"print(x.type())\n",
"print(x.shape)\n",
"print(x)"
"describe(x)"
]
},
{
Expand Down Expand Up @@ -715,7 +713,7 @@
],
"source": [
"x = torch.arange(0, 10)\n",
"print(x)"
"describe(x)"
]
},
{
Expand All @@ -740,7 +738,7 @@
],
"source": [
"x = torch.arange(0, 10).long()\n",
"print(x)"
"describe(x)"
]
},
{
Expand Down Expand Up @@ -893,13 +891,13 @@
],
"source": [
"x = torch.arange(12).view(3, 4)\n",
"print(x.shape)\n",
"describe(x)\n",
"\n",
"x = x.unsqueeze(dim=1)\n",
"print(x.shape)\n",
"describe(x)\n",
"\n",
"x = x.squeeze()\n",
"print(x.shape)"
"describe(x)"
]
},
{
Expand Down