torch随机生成一个tensor
时间: 2023-09-23 20:06:06 浏览: 130
要使用torch随机生成一个tensor,你可以使用torch.rand函数。这个函数返回一个tensor,其中包含了从<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [torch生成随机tensor](https://blog.csdn.net/nicexiangshuai/article/details/106465435)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [torch常用tensor随机数生成-笔记](https://blog.csdn.net/qq_41138191/article/details/121487463)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文