Is there an easy way to extract tensor by viewing the elements as indices?

前端 未结 0 1051
长发绾君心
长发绾君心 2021-01-23 01:49

The input tensor shape as below

input = 
[[ 0  0  1  2]
 [ 0  3  4  5]
 [ 0  6  7  8]
 [ 1  9 10 11]
 [ 1 12 13 14]
 [ 1 15 16 17]
 [ 1 18 19 20]
 [ 1 21 22 23]
          


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