텐서플로우:: ops:: GatherV2

#include <array_ops.h>

indices 에 따라 params axis 에서 슬라이스를 수집합니다 .

요약

indices 임의의 차원(일반적으로 0차원 또는 1차원)의 정수 텐서여야 합니다. 출력 텐서는 params.shape[:axis] + indices.shape + params.shape[axis + 1:] 형태를 가집니다.

    # Scalar indices (output is rank(params) - 1).
    output[a_0, ..., a_n, b_0, ..., b_n] =
      params[a_0, ..., a_n, indices, b_0, ..., b_n]

    # Vector indices (output is rank(params)).
    output[a_0, ..., a_n, i, b_0, ..., b_n] =
      params[a_0, ..., a_n, indices[i], b_0, ..., b_n]

    # Higher rank indices (output is rank(params) + rank(indices) - 1).
    output[a_0, ..., a_n, i, ..., j, b_0, ... b_n] =
      params[a_0, ..., a_n, indices[i, ..., j], b_0, ..., b_n]

참고로, CPU 환경에서는 인덱스 범위를 벗어난 경우 오류가 반환됩니다. GPU 환경에서는 인덱스 범위를 벗어난 경우 해당 출력 값에 0이 저장됩니다.

tf.batch_gather 및 tf.gather_nd 도 참조하십시오.

논거:

  • 범위: Scope 객체
  • params: 값을 가져올 텐서입니다. 최소 rank axis + 1 이상이어야 합니다.
  • indices: 인덱스 텐서. [0, params.shape[axis]) 범위 내에 있어야 합니다.
  • axis: params 에서 indices 가져올 축입니다. 기본값은 첫 번째 차원입니다. 음수 인덱스를 지원합니다.

보고:

  • Output : indices 에서 제공된 인덱스로부터 수집된 params 의 값, 형태는 params.shape[:axis] + indices.shape + params.shape[axis + 1:] 입니다.

생성자와 소멸자

GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis)
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis, const GatherV2::Attrs & attrs)

공개 속성

operation
output

공공 기능

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

공개 정적 함수

BatchDims (int64 x)

구조

텐서플로우:: ops:: GatherV2:: Attrs

GatherV2 에 대한 선택적 속성 설정기입니다.

공개 속성

작업

Operation operation

산출

::tensorflow::Output output

공공 기능

GatherV2

 GatherV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices,
  ::tensorflow::Input axis
)

GatherV2

 GatherV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices,
  ::tensorflow::Input axis,
  const GatherV2::Attrs & attrs
)

마디

::tensorflow::Node * node() const 

연산자::텐서플로우::입력

 operator::tensorflow::Input() const 

연산자::텐서플로우::출력

 operator::tensorflow::Output() const 

공개 정적 함수

배치 크기

Attrs BatchDims(
  int64 x
)