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

Update 03.md

修改错误的注释
上级 3d20ad8f
......@@ -40,8 +40,7 @@ x_np = torch.from_numpy(np_array)
x_ones = torch.ones_like(x_data) # 保留 x_data 的属性
print(f"Ones Tensor: \n {x_ones} \n")
x_rand = torch.rand_like(x_data, dtype=torch.float) # 重写 x_data 的数据类型
int -> float
x_rand = torch.rand_like(x_data, dtype=torch.float) # 重写 x_data 的数据类型:int -> float
print(f"Random Tensor: \n {x_rand} \n")
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册