tensorflow::ops::ScatterMin
#include <state_ops.h>
Сводит разреженные обновления в ссылку на переменную с помощью операции min.
Краткое описание
Эта операция вычисляет
# Scalar indices ref[indices, ...] = min(ref[indices, ...], updates[...]) # Vector indices (for each i) ref[indices[i], ...] = min(ref[indices[i], ...], updates[i, ...]) # High rank indices (for each i, ..., j) ref[indices[i, ..., j], ...] = min(ref[indices[i, ..., j], ...], updates[i, ..., j, ...])
После выполнения обновления операция возвращает ref. Это упрощает объединение в цепочку операций, которым нужно использовать сброшенное значение.
Повторяющиеся записи обрабатываются корректно: если несколько ссылок indices указывают на одно и то же место, их вклады объединяются.
Требуется updates.shape = indices.shape + ref.shape[1:] или updates.shape = [].
Аргументы:
- scope: объект Scope
- ref: Должен поступать из узла
Variable. - indices: Тензор индексов первого измерения
ref. - updates: Тензор обновлённых значений для сведения в
ref.
Необязательные атрибуты (см. Attrs):
- use_locking: Если True, обновление будет защищено блокировкой; в противном случае поведение не определено, но может сопровождаться меньшей конкуренцией за ресурсы.
Возвращает:
-
Output: = То же, что иref. Возвращается для удобства операций, которым нужно использовать обновлённые значения после выполнения обновления.
| Конструкторы и деструкторы | |
|---|---|
ScatterMin(const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates) | |
ScatterMin(const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterMin::Attrs & attrs) |
| Общедоступные атрибуты | |
|---|---|
operation | |
output_ref | |
| Общедоступные функции | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Общедоступные статические функции | |
|---|---|
UseLocking(bool x) | |
| Структуры | |
|---|---|
| tensorflow::ops::ScatterMin::Attrs | Методы установки необязательных атрибутов для ScatterMin. |
Общедоступные атрибуты
operation
Operation operation
output_ref
::tensorflow::Output output_ref
Общедоступные функции
ScatterMin
ScatterMin( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates )
ScatterMin
ScatterMin( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterMin::Attrs & attrs )
node
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Общедоступные статические функции
UseLocking
Attrs UseLocking( bool x )
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/scatter-min