Google I/O에 참여해 주셔서 감사합니다. 주문형 모든 세션 보기 주문형 시청

tensorflow :: ops :: Where3

#include <math_ops.h>

condition 에 따라 x 또는 y 에서 요소를 선택합니다.

요약

xy 텐서는 모두 동일한 모양을 가져야하며 출력도 해당 모양을 갖습니다.

xy 가 스칼라 인 경우 condition 텐서는 스칼라 여야합니다. 경우 xy 벡터 이상의 등급이며, 그 다음 condition 스칼라 크기의 제 치수와 일치하는 벡터이어야 x , 또는 동일한 형상 있어야 x .

condition 텐서는 각 요소의 값에 따라 출력의 해당 요소 / 행을 x (참인 경우) 또는 y (거짓 인 경우)에서 x 하는지 여부를 선택하는 마스크 역할을합니다.

condition 이 벡터이고 xy 가 상위 행렬 인 경우 xy 에서 복사 할 행 (외부 차원)을 선택합니다. 경우 condition 동일한 형상 가지고 xy , 그때는 복사 소자 선택되는 xy .

예를 들면 :

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

산출

::tensorflow::Output output

공공 기능

Where3

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

마디

::tensorflow::Node * node() const 

연산자 :: tensorflow :: 입력

 operator::tensorflow::Input() const 

연산자 :: tensorflow :: 출력

 operator::tensorflow::Output() const