tensorflow::ops::UnsortedSegmentJoin
#include <string_ops.h> Объединяет элементы inputs на основе segment_ids .
Краткое содержание
Вычисляет объединение строк вдоль сегментов тензора. При наличии 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
- Входные данные: Входные данные, которые необходимо объединить.
- segment_ids: Тензор, форма которого является префиксом data.shape. Отрицательные идентификаторы сегментов не поддерживаются.
- num_segments: Скаляр.
Дополнительные атрибуты (см. Attrs ):
- Разделитель: Разделитель, используемый при соединении.
Возвращает:
-
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 | |
output | |
Общественные функции | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Открытые статические функции | |
|---|---|
Separator (StringPiece x) | |
Структуры | |
|---|---|
| tensorflow::ops::UnsortedSegmentJoin::Attrs | Дополнительные параметры установки атрибутов для UnsortedSegmentJoin . |
Общедоступные атрибуты
операция
Operation operation
выход
::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 )
узел
::tensorflow::Node * node() const
оператор::tensorflow::Input
operator::tensorflow::Input() const
оператор::tensorflow::Output
operator::tensorflow::Output() const
Открытые статические функции
Сепаратор
Attrs Separator( StringPiece x )