a = torch.rand(4, 3, 28, 28) print(a.index_select(0, torch.tensor([0, 2])).shape) # torch.Size([2, 3, 28, 28]) 选择图片中的第0/2两张图片; ...
確定! 回上一頁