torch.cat参数
时间: 2023-10-15 07:24:14 浏览: 85
torch.cat函数有两个参数。第一个参数是tensor元组或者tensor列表,用于指定要连接的矩阵。第二个参数是dim,用于指定连接的维度。如果tensor是二维的,dim=0表示在行上连接,dim=1表示在列上连接。需要注意的是,在行上连接时,是扩展行进行连接;在列上连接时,是扩展列进行连接。连接的tensor必须具有相同的shape,除了连接的维度上的shape值可以不同。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [torch.cat函数深入详解](https://blog.csdn.net/qq_37715291/article/details/122119539)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Pytorch中torch.cat()函数解析](https://blog.csdn.net/flyingluohaipeng/article/details/125038212)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文