tensorflow :: ops :: Nerede3
#include <math_ops.h>
Arasından seçer elemanları x
veya y
bağlı olarak, condition
.
Özet
x
ve y
tensörlerinin hepsi aynı şekle sahip olmalıdır ve çıktı da bu şekle sahip olacaktır.
x
ve y
skaler ise condition
tensörü skaler olmalıdır. Eğer x
ve y
vektörleri ya da daha yüksek bir seviye, o zaman condition
skalar, boyut ilk boyutu ile eşleşen bir vektörü ya olmalıdır x
ya da aynı şekle sahip olmalıdır x
.
condition
tensörü, her bir öğedeki değere bağlı olarak, çıktıdaki ilgili öğenin / satırın x
(doğruysa) veya y
(yanlışsa) alınması gerektiğini seçen bir maske görevi görür.
Eğer condition
için bir vektör ve x
ve y
daha yüksek seviye matrisleridir, o zaman kopyalamak için olan satır (dış boyut) seçer x
ve y
. Eğer condition
ile aynı şekle sahiptir x
ve y
, o zaman kopyalamak için bu eleman seçer x
ve y
.
Örneğin:
# 'condition' tensor is [[True, False] # [False, True]] # 't' is [[1, 2], # [3, 4]] # 'e' is [[5, 6], # [7, 8]] select(condition, t, e) # => [[1, 6], [7, 4]]
# 'condition' tensor is [True, False] # 't' is [[1, 2], # [3, 4]] # 'e' is [[5, 6], # [7, 8]] select(condition, t, e) ==> [[1, 2], [7, 8]]
Arguments:
- scope: A Scope object
- x: = A
Tensor
which may have the same shape ascondition
. Ifcondition
is rank 1,x
may have higher rank, but its first dimension must match the size ofcondition
. - y: = A
Tensor
with the same type and shape asx
.
Returns:
Constructors and Destructors |
|
---|---|
Where3(const ::tensorflow::Scope & scope, ::tensorflow::Input condition, ::tensorflow::Input x, ::tensorflow::Input y)
|
Public attributes |
|
---|---|
operation
|
|
output
|
Public functions |
|
---|---|
node() const
|
::tensorflow::Node *
|
operator::tensorflow::Input() const
|
|
operator::tensorflow::Output() const
|
|
Public attributes
operation
Operation operation
çıktı
::tensorflow::Output output
Kamusal işlevler
Nerede3
Where3( const ::tensorflow::Scope & scope, ::tensorflow::Input condition, ::tensorflow::Input x, ::tensorflow::Input y )
düğüm
::tensorflow::Node * node() const
operator :: tensorflow :: Girdi
operator::tensorflow::Input() const
operator :: tensorflow :: Çıktı
operator::tensorflow::Output() const