摘要: import torch a = torch.randint(0, 100, (6,3)) b = torch.Tensor([0, 1, 1, 2, 0, 2]).long() b = b.unsqueeze(1) b0 = b.view(-1, 1) b2 = a.gather(1, b.vie 阅读全文
posted @ 2023-03-25 19:23 无左无右 阅读(15) 评论(0) 推荐(0) 编辑