tensorflow :: ops :: GatherV2
#include <array_ops.h>
indices
에 따라 params
축 axis
에서 슬라이스를 수집 합니다.
요약
indices
는 모든 차원의 정수 텐서 여야합니다 (일반적으로 0-D 또는 1-D). 모양 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
도 참조하십시오.
인수 :
- 범위 : 범위 개체
- params : 값을 수집 할 텐서입니다. 랭크
axis + 1
이상이어야합니다. - 인덱스 : 인덱스 텐서.
[0, params.shape[axis])
범위에 있어야합니다. - axis :
indices
를 수집 할params
의 축입니다. 기본값은 첫 번째 차원입니다. 음수 인덱스를 지원합니다.
보고:
-
Output
:의 값params
주어진 인덱스에서 수집indices
, 형상과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) |
구조체 | |
---|---|
tensorflow :: ops :: GatherV2 :: 속성 | 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
연산자 :: tensorflow :: 입력
operator::tensorflow::Input() const
연산자 :: tensorflow :: 출력
operator::tensorflow::Output() const
공개 정적 함수
BatchDims
Attrs BatchDims( int64 x )