fluxo tensor:: ops:: Onde3

#include <math_ops.h>

Seleciona elementos de x ou y , dependendo da condition .

Resumo

Os tensores x e y devem ter todos o mesmo formato e a saída também terá esse formato.

O tensor condition deve ser escalar se x e y forem escalares. Se x e y são vetores ou de classificação superior, então condition deve ser um escalar, um vetor com tamanho correspondente à primeira dimensão de x , ou deve ter a mesma forma que x .

O tensor condition atua como uma máscara que escolhe, com base no valor de cada elemento, se o elemento/linha correspondente na saída deve ser obtido de x (se verdadeiro) ou y (se falso).

Se condition for um vetor e x e y forem matrizes de classificação mais alta, ele escolherá qual linha (dimensão externa) copiar de x e y . Se condition tiver o mesmo formato de x e y , ela escolherá qual elemento copiar de x e y .

Por exemplo:

# '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
     

       

         
Operation
       

     

       
output
     

       

         
::tensorflow::Output
       

     

 

   

     

   

   

     

     

   

   

     

     

   

   

     

     

   

 

       

Public functions


     

       
node() const
     

       

         
::tensorflow::Node *
       

     

       
operator::tensorflow::Input() const
     

       

         

       

     

       
operator::tensorflow::Output() const
     

       

         

       

     

 

Public attributes


 

   

operation


   

saída

 

Funções públicas

 Onde3

 

nó

 

 operador::tensorflow::Input

 

 operador::tensorflow::Saída