File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 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 {
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 {
715713 ],
716714 "source" : [
717715 " x = torch.arange(0, 10)\n " ,
718- " print (x)"
716+ " describe (x)"
719717 ]
720718 },
721719 {
740738 ],
741739 "source" : [
742740 " x = torch.arange(0, 10).long()\n " ,
743- " print (x)"
741+ " describe (x)"
744742 ]
745743 },
746744 {
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 {
You can’t perform that action at this time.
0 commit comments