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

tensorflow :: ops :: SparseConcat

#include <sparse_ops.h>

지정된 차원을 따라 SparseTensor 목록을 연결합니다.

요약

연결은 이러한 희소 텐서의 조밀 한 버전과 관련됩니다. 각 입력은 요소가 증가하는 차원 번호를 따라 정렬되는 SparseTensor 라고 가정합니다.

concat 차원을 제외하고 모든 입력의 모양이 일치해야합니다. indices , valuesshapes 목록은 길이가 같아야합니다.

출력 모양은 해당 차원에 따른 입력 크기의 합계 인 연결 차원을 제외하고는 입력의 모양과 동일합니다.

출력 요소는 증가하는 차원 번호에 따라 정렬 순서를 유지하도록 재 지정됩니다.

이 작업은 O(M log M) 시간에 실행됩니다. 여기서 M 은 모든 입력에서 비어 있지 않은 값의 총 수입니다. 이는 임의의 차원에서 효율적으로 연결하기 위해 내부 정렬이 필요하기 때문입니다.

예를 들어 concat_dim = 1 이고 입력이

sp_inputs[0]: shape = [2, 3]
[0, 2]: "a"
[1, 0]: "b"
[1, 1]: "c"

sp_inputs[1]: shape = [2, 4]
[0, 1]: "d"
[0, 2]: "e"
인 경우

그러면 출력은

shape = [2, 7]
[0, 2]: "a"
[0, 4]: "d"
[0, 5]: "e"
[1, 0]: "b"
[1, 1]: "c"
이됩니다.

그래픽 적으로 이것은

[    a] concat [  d e  ] = [    a   d e  ]
[b c  ]        [       ]   [b c          ]
을 수행하는 것과 동일합니다.

인수 :

  • 범위 : 범위 개체
  • 인덱스 : 2-D. 각 입력 SparseTensor 인덱스입니다.
  • 값 : 1-D. 각 SparseTensor 의 비어 있지 않은 값.
  • 모양 : 1-D. 각 SparseTensor 모양.
  • concat_dim : 연결할 치수입니다. 범위 [-rank, rank)에 있어야합니다. 여기서 rank는 각 입력 SparseTensor 의 차원 수입니다.

보고:

  • Output output_indices : 2-D. 연결된 SparseTensor 인덱스입니다.
  • Output output_values ​​: 1-D. 연결된 SparseTensor 의 비어 있지 않은 값.
  • Output output_shape : 1-D. 연결된 SparseTensor 모양.

생성자와 소멸자

SparseConcat (const :: tensorflow::Scope & scope, :: tensorflow::InputList indices, :: tensorflow::InputList values, :: tensorflow::InputList shapes, int64 concat_dim)

공용 속성

operation
output_indices
output_shape
output_values

공용 속성

조작

Operation operation

출력 _ 인덱스

::tensorflow::Output output_indices

output_shape

::tensorflow::Output output_shape

출력 _ 값

::tensorflow::Output output_values

공공 기능

SparseConcat

 SparseConcat(
  const ::tensorflow::Scope & scope,
  ::tensorflow::InputList indices,
  ::tensorflow::InputList values,
  ::tensorflow::InputList shapes,
  int64 concat_dim
)