Spec-Zone.ru › TensorFlow C++ 2.3

tensorflow::ops::UnsortedSegmentJoin

#include <string_ops.h>

Объединяет элементы inputs на основе segment_ids.

Summary

Вычисляет объединение строк по сегментам тензора. Дано segment_ids с рангом N и data с рангом N+M:

`output[i, k1...kM] = strings.join([data[j1...jN, k1...kM])`

где объединение выполняется по всем [j1...jN] таким, что segment_ids[j1...jN] = i. Строки объединяются в порядке следования строк в матрице.

Например:

inputs = [['Y', 'q', 'c'], ['Y', '6', '6'], ['p', 'G', 'a']]
output_array = string_ops.unsorted_segment_join(inputs=inputs,
                                                segment_ids=[1, 0, 1],
                                                num_segments=2,
                                                separator=':'))
# output_array ==> [['Y', '6', '6'], ['Y:p', 'q:G', 'c:a']]
inputs = ['this', 'is', 'a', 'test']
output_array = string_ops.unsorted_segment_join(inputs=inputs,
                                                segment_ids=[0, 0, 0, 0],
                                                num_segments=1,
                                                separator=':'))
# output_array ==> ['this:is:a:test']

Аргументы:

  • scope: Объект Scope
  • inputs: Входные данные для объединения.
  • segment_ids: Тензор, форма которого является префиксом data.shape. Отрицательные индексы сегментов не поддерживаются.
  • num_segments: Скаляр.

Необязательные атрибуты (см. Attrs):

  • separator: Разделитель для объединения.

Возвращает:

  • Output: Результирующий тензор.
Конструкторы и деструкторы
UnsortedSegmentJoin(const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input segment_ids, ::tensorflow::Input num_segments)
UnsortedSegmentJoin(const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input segment_ids, ::tensorflow::Input num_segments, const UnsortedSegmentJoin::Attrs & attrs)
Общедоступные атрибуты
operation
Operation
output
::tensorflow::Output
Общедоступные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Общедоступные статические функции
Separator(StringPiece x)
Attrs
Структуры
tensorflow::ops::UnsortedSegmentJoin::Attrs

Необязательные установки атрибутов для UnsortedSegmentJoin.

Общедоступные атрибуты

operation

Operation operation

output

::tensorflow::Output output

Общедоступные функции

UnsortedSegmentJoin

 UnsortedSegmentJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input segment_ids,
  ::tensorflow::Input num_segments
)

UnsortedSegmentJoin

 UnsortedSegmentJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input segment_ids,
  ::tensorflow::Input num_segments,
  const UnsortedSegmentJoin::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

Общедоступные статические функции

Separator

Attrs Separator(
  StringPiece x
)

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/unsorted-segment-join

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API