tensorflow::ops::ScatterMul
#include <state_ops.h>
Умножает разреженные обновления на ссылку на переменную.
Краткое описание
Данная операция вычисляет
# Scalar indices ref[indices, ...] *= updates[...]
# Vector indices (for each i) ref[indices[i], ...] *= updates[i, ...]
# High rank indices (for each i, ..., j) 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. Возвращается для удобства операций, которые хотят использовать обновлённые значения после завершения обновления.
| Конструкторы и деструкторы | |
|---|---|
ScatterMul(const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates) | |
ScatterMul(const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterMul::Attrs & attrs) |
| Общедоступные атрибуты | |
|---|---|
operation | |
output_ref | |
| Общедоступные функции | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Общедоступные статические функции | |
|---|---|
UseLocking(bool x) | |
| Структуры | |
|---|---|
| tensorflow::ops::ScatterMul::Attrs | Необязательные установщики атрибутов для ScatterMul. |
Общедоступные атрибуты
operation
Operation operation
output_ref
::tensorflow::Output output_ref
Общедоступные функции
ScatterMul
ScatterMul( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates )
ScatterMul
ScatterMul( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterMul::Attrs & attrs )
узел
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Общедоступные статические функции
Использовать блокировку
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-mul