Spec-Zone.ru › TensorFlow C++ 2.9

tensorflow::ops::ScatterUpdate

#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 после завершения обновления. Это упрощает цепочку операций, которые нуждаются в использовании обновлённого значения.

Если значения в ref должны быть обновлены более одного раза, из-за наличия дублирующихся записей в indices, порядок обновлений для каждого значения не определён.

Требует updates.shape = indices.shape + ref.shape[1:] или updates.shape = [].

См. также tf.batch_scatter_update и tf.scatter_nd_update.

Аргументы:

  • scope: Объект Scope
  • ref: Должен быть получен из узла Variable.
  • indices: Массив индексов в первом измерении ref.
  • updates: Массив обновлённых значений для хранения в ref.

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

  • use_locking: Если True, присвоение будет защищено блокировкой; в противном случае поведение не определено, но может иметь меньше конфликтов.

Возвращает:

  • Output: = Аналогично ref. Возвращается для удобства операций, которые хотят использовать обновлённые значения после завершения обновления.
Конструкторы и деструкторы
ScatterUpdate(const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates)
ScatterUpdate(const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterUpdate::Attrs & attrs)
Общественные атрибуты
operation
Operation
output_ref
::tensorflow::Output
Общественные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Общественные статические функции
UseLocking(bool x)
Attrs
Структуры
tensorflow::ops::ScatterUpdate::Attrs

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

Общественные атрибуты

operation

Operation operation

output_ref

::tensorflow::Output output_ref

Общественные функции

ScatterUpdate

 ScatterUpdate(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input indices,
  ::tensorflow::Input updates
)

ScatterUpdate

 ScatterUpdate(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input indices,
  ::tensorflow::Input updates,
  const ScatterUpdate::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/versions/r2.9/api_docs/cc/class/tensorflow/ops/scatter-update

Spec-Zone.ru

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