摘要: https://zhuanlan.zhihu.com/p/474153365 torch.repeat 使张量沿着某个维度进行复制, 并且不仅可以复制张量,也可以拓展张量的维度: import torch x = torch.randn(2, 4) # 1. 沿着某个维度复制 x.repeat(1, 阅读全文
posted @ 2022-08-18 18:18 SXQ-BLOG 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 链接:https://blog.csdn.net/yzlh2009/article/details/114118470 情况一,索引数组为整数值 情况二,索引数组为bool值 阅读全文
posted @ 2022-08-18 15:34 SXQ-BLOG 阅读(149) 评论(0) 推荐(0) 编辑