tensorflow::ops::Where3

#include <math_ops.h>

condition bağlı olarak x veya y kümesinden elemanlar seçer.

Özet

x ve y tensörlerinin hepsi aynı şekle sahip olmalı ve çıktı da aynı şekle sahip olacaktır.

x ve y skaler ise, condition tensörü de skaler olmalıdır. x ve y vektör veya daha yüksek dereceli ise, condition ya skaler olmalı, ya x ilk boyutuna eşit boyutta bir vektör olmalı ya da x ile aynı şekle sahip olmalıdır.

condition tensörü, her bir elemanın değerine bağlı olarak, çıktıda karşılık gelen elemanın/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 bir vektör ise ve x ile y daha yüksek dereceli matrisler ise, x ve y hangi satırı (dış boyutu) kopyalayacağını seçer. Eğer condition , x ve y ile aynı şekle sahipse, x ve y hangi elemanı kopyalayacağını seçer.

Ö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 as condition. If condition is rank 1, x may have higher rank, but its first dimension must match the size of condition.
  • y: = A Tensor with the same type and shape as x.

Returns:

  • Output: = A Tensor with the same type and shape as x and y.

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

Where3

 Where3(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input condition,
  ::tensorflow::Input x,
  ::tensorflow::Input y
)

düğüm

::tensorflow::Node * node() const 

operatör::tensorflow::Giriş

 operator::tensorflow::Input() const 

operatör::tensorflow::Çıktı

 operator::tensorflow::Output() const