Skip to content

Commit 9a9e263

Browse files
authored
Merge pull request delip#24 from reynoldsnlp/patch-2
typo and extend use of `describe`
2 parents 6169d3e + 2560905 commit 9a9e263

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

chapters/chapter_1/PyTorch_Basics.ipynb

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"cell_type": "markdown",
5858
"metadata": {},
5959
"source": [
60-
"You can create tensors by specifying the shape as arguments. Here is a tensor with 5 rows and 3 columns"
60+
"You can create tensors by specifying the shape as arguments. Here is a tensor with 2 rows and 3 columns"
6161
]
6262
},
6363
{
@@ -213,9 +213,7 @@
213213
],
214214
"source": [
215215
"x = torch.Tensor(3,4).fill_(5)\n",
216-
"print(x.type())\n",
217-
"print(x.shape)\n",
218-
"print(x)"
216+
"describe(x)"
219217
]
220218
},
221219
{
@@ -715,7 +713,7 @@
715713
],
716714
"source": [
717715
"x = torch.arange(0, 10)\n",
718-
"print(x)"
716+
"describe(x)"
719717
]
720718
},
721719
{
@@ -740,7 +738,7 @@
740738
],
741739
"source": [
742740
"x = torch.arange(0, 10).long()\n",
743-
"print(x)"
741+
"describe(x)"
744742
]
745743
},
746744
{
@@ -893,13 +891,13 @@
893891
],
894892
"source": [
895893
"x = torch.arange(12).view(3, 4)\n",
896-
"print(x.shape)\n",
894+
"describe(x)\n",
897895
"\n",
898896
"x = x.unsqueeze(dim=1)\n",
899-
"print(x.shape)\n",
897+
"describe(x)\n",
900898
"\n",
901899
"x = x.squeeze()\n",
902-
"print(x.shape)"
900+
"describe(x)"
903901
]
904902
},
905903
{

0 commit comments

Comments
 (0)