admin管理员组

文章数量:1123263

I have a n.n torch matrix A containing indexes from 10 to n-1. I want to Build another torch matrix B where B[A[i,j]]=1 not using loop.

Additionally I want to build another matrix C of 1.n size where it will store index of first 0 in the each array.

本文标签: pytorchTorch Matrix with indexesStack Overflow