pytorch有没有unique
时间: 2023-10-16 13:07:15 浏览: 77
Python库 | beunique-0.1.tar.gz
是的,PyTorch提供了torch.unique()函数来查找张量中的唯一值。您可以使用torch.unique()函数来查找张量中的唯一元素,并返回一个新的张量,其中包含原始张量中的唯一元素。<span class="em">1</span><span class="em">2</span>
#### 引用[.reference_title]
- *1* [pytorch nonzero(), torch.unique()](https://blog.csdn.net/qq_43739296/article/details/120224660)[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_1"}}] [.reference_item style="max-width: 50%"]
- *2* [tab-transformer-pytorch:在 Pytorch 中实现 TabTransformer,表格数据的注意力网络](https://download.csdn.net/download/weixin_42118770/19218406)[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_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文