How do I get the diagonal of a tensor of rank higher than 2 along selected axis in tensorflow

前端 未结 0 649
渐次进展
渐次进展 2020-12-10 07:08

I have an Tensor of shape tf.shape(input)=(Batch_Size,Channels,N,N) my goal is it to calculate and output which contains all diagonal elements along axis 2&

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