Tensorflow: Reshape a tensor according to a boolean mask

前端 未结 0 2024
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 05:36

I have a 1D tensor of values: a = tf.constant([0.1, 0.2, 0.3, 0.4])

and a nD boolean mask: b = tf.constant([[1, 1, 0], [0, 1, 1]])

The total number of 1\'s in b ma

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