未验证 提交 40a5d737 编写于 作者: H hummingg 提交者: GitHub

Update 03.md

修改错误的注释
上级 3d20ad8f
...@@ -40,8 +40,7 @@ x_np = torch.from_numpy(np_array) ...@@ -40,8 +40,7 @@ x_np = torch.from_numpy(np_array)
x_ones = torch.ones_like(x_data) # 保留 x_data 的属性 x_ones = torch.ones_like(x_data) # 保留 x_data 的属性
print(f"Ones Tensor: \n {x_ones} \n") print(f"Ones Tensor: \n {x_ones} \n")
x_rand = torch.rand_like(x_data, dtype=torch.float) # 重写 x_data 的数据类型 x_rand = torch.rand_like(x_data, dtype=torch.float) # 重写 x_data 的数据类型:int -> float
int -> float
print(f"Random Tensor: \n {x_rand} \n") print(f"Random Tensor: \n {x_rand} \n")
``` ```
...@@ -289,4 +288,4 @@ n: [2. 2. 2. 2. 2.] ...@@ -289,4 +288,4 @@ n: [2. 2. 2. 2. 2.]
[下载 Jupyter 笔记本:`tensor_tutorial.ipynb`](https://pytorch.org/tutorials/_downloads/3c2b25b8a9f72db7780a6bf9b5fc9f62/tensor_tutorial.ipynb) [下载 Jupyter 笔记本:`tensor_tutorial.ipynb`](https://pytorch.org/tutorials/_downloads/3c2b25b8a9f72db7780a6bf9b5fc9f62/tensor_tutorial.ipynb)
[由 Sphinx 画廊](https://sphinx-gallery.readthedocs.io)生成的画廊 [由 Sphinx 画廊](https://sphinx-gallery.readthedocs.io)生成的画廊
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册