Pytorch笔记:诡异的索引操作 + too many indices for tensor of dimension 1的一种解决方法
问题too many indices for tensor of dimension 1具体的错误信息忘记截图,大概就是上面的意思,对应的错误代码如下错误代码# 下面代码是博主自己随意码的,具体要说一下怎么解决这种问题import torchindex = torch.tensor([20,10,25,39,5,12]) # 这些index的值,对应着point中的索引point = torch.ones(2,40)# 然后用index中的数对point进行各点取值result_x =