tensorflow::ops::ScatterMax
#include <state_ops.h>
Снижает разрозненные обновления в ссылку на переменную, используя операцию max.
Summary
Эта операция вычисляет
# Scalar indices ref[indices, ...] = max(ref[indices, ...], updates[...]) # Vector indices (for each i) ref[indices[i], ...] = max(ref[indices[i], ...], updates[i, ...]) # High rank indices (for each i, ..., j) ref[indices[i, ..., j], ...] = max(ref[indices[i, ..., j], ...], updates[i, ..., j, ...])
Эта операция выводит ref после выполнения обновления. Это упрощает цепочки операций, которые должны использовать значение сброса.
Дублированные записи обрабатываются корректно: если несколько indices ссылаются на одно и то же местоположение, их вклады суммируются.
Требуется updates.shape = indices.shape + ref.shape[1:] или updates.shape = [].
Аргументы:
- scope: Объект Scope
- ref: Должен быть из узла
Variable. - indices: Tensor индексов в первом измерении
ref. - updates: Tensor обновленных значений для сведения в
ref.
Дополнительные атрибуты (см. Attrs):
- use_locking: Если True, обновление будет защищено блокировкой; в противном случае поведение не определено, но может демонстрировать меньшую конкуренцию.
Возвращает:
-
Output: = То же, что иref. Возвращается для удобства операций, которые хотят использовать обновлённые значения после обновления.
| Конструкторы и деструкторы | |
|---|---|
ScatterMax(const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates) | |
ScatterMax(const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterMax::Attrs & attrs) |
| Публичные атрибуты | |
|---|---|
operation | |
output_ref | |
| Публичные функции | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Публичные статические функции | |
|---|---|
UseLocking(bool x) | |
| Структуры | |
|---|---|
| tensorflow::ops::ScatterMax::Attrs | Дополнительные атрибуты-установщики для ScatterMax. |
Публичные атрибуты
operation
Operation operation
output_ref
::tensorflow::Output output_ref
Публичные функции
ScatterMax
ScatterMax( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates )
ScatterMax
ScatterMax( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterMax::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 )
© 2020 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/versions/r2.4/api_docs/cc/class/tensorflow/ops/scatter-max