How to perform indexing and slicing for sparse tensor

后端 未结 0 952
名媛妹妹
名媛妹妹 2021-01-22 20:14

I\'m trying to access elements of the sparse coo tensor.

i = [[0,2]]
v = [np.array([1,2,3,4]),[5,6,7,8]]
a = torch.sparse_coo_tensor(i,v,(4,4))
print(a.to_dense()         


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