tf.where()函數

tf.where()定義如下: where(condition, x=None, y=None,name=None) condition:一個Tensor,數據類型爲tf.bool類型 如果x、y均爲空,那麼返回condition中值爲True的位置的Tensor:例如:x就是condition,y是返回值 x中值爲True的位置有[0,0,0],[0,1,1],[0,2,0],[0,2,1],[
相關文章
相關標籤/搜索