Is the combination of tensor_diag_part and gather inefficient?

后端 未结 0 1868
闹比i
闹比i 2020-11-28 07:00

I have tensors A_{ij} and B_i, and I want to compute the tensor A_{iB_i}. In numpy I can do this via

A[np.arange(N), B]         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题