Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::
ops::
ScatterMin
#include <state_ops.h>
Reduces sparse updates into a variable reference using the
min
operation.
Summary
This operation computes
# 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, ...])
This operation outputs
ref
after the update is done. This makes it easier to chain operations that need to use the reset value.
Duplicate entries are handled correctly: if multiple
indices
reference the same location, their contributions combine.
Requires
updates.shape = indices.shape + ref.shape[1:]
or
updates.shape = []
.
Args:
-
scope: A
Scope
object
-
ref: Should be from a
Variable
node.
-
indices: A tensor of indices into the first dimension of
ref
.
-
updates: A tensor of updated values to reduce into
ref
.
Optional attributes (see
Attrs
):
-
use_locking: If True, the update will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
Returns:
-
Output
: = Same as
ref
. Returned as a convenience for operations that want to use the updated values after the update is done.
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
UseLocking
Attrs UseLocking(
bool x
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2021-05-14 UTC.
[null,null,["Last updated 2021-05-14 UTC."],[],[],null,["# tensorflow::ops::ScatterMin Class Reference\n\ntensorflow::\nops::\nScatterMin\n=============================\n\n`\n#include \u003cstate_ops.h\u003e\n`\n\n\nReduces sparse updates into a variable reference using the\n`\nmin\n`\noperation.\n\nSummary\n-------\n\n\nThis operation computes \n\n```transact-sql\n# Scalar indices\nref[indices, ...] = min(ref[indices, ...], updates[...])\n\n# Vector indices (for each i)\nref[indices[i], ...] = min(ref[indices[i], ...], updates[i, ...])\n\n# High rank indices (for each i, ..., j)\nref[indices[i, ..., j], ...] = min(ref[indices[i, ..., j], ...], updates[i, ..., j, ...])\n```\n\n\u003cbr /\u003e\n\n\nThis operation outputs\n`\nref\n`\nafter the update is done. This makes it easier to chain operations that need to use the reset value.\n\n\nDuplicate entries are handled correctly: if multiple\n`\nindices\n`\nreference the same location, their contributions combine.\n\n\nRequires\n`\nupdates.shape = indices.shape + ref.shape[1:]\n`\nor\n`\nupdates.shape = []\n`\n.\n\n\n\u003cbr /\u003e\n\n\nArgs:\n\n- scope: A [Scope](/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- ref: Should be from a `\n `[Variable](/versions/r2.5/api_docs/cc/class/tensorflow/ops/variable#classtensorflow_1_1ops_1_1_variable)`\n ` node.\n- indices: A tensor of indices into the first dimension of `\n ref\n ` .\n- updates: A tensor of updated values to reduce into `\n ref\n ` .\n\n\u003cbr /\u003e\n\n\nOptional attributes (see\n`\n`[Attrs](/versions/r2.5/api_docs/cc/struct/tensorflow/ops/scatter-min/attrs#structtensorflow_1_1ops_1_1_scatter_min_1_1_attrs)`\n`\n):\n\n- use_locking: If True, the update will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.\n\n\u003cbr /\u003e\n\n\nReturns:\n\n- `\n `[Output](/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)`\n ` : = Same as `\n ref\n ` . Returned as a convenience for operations that want to use the updated values after the update is done.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| ` `[ScatterMin](#classtensorflow_1_1ops_1_1_scatter_min_1a20672036c077b2295fe3b7f263f1cbbc)` (const :: `[tensorflow::Scope](/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` ref, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` indices, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` updates) ` ||\n| ` `[ScatterMin](#classtensorflow_1_1ops_1_1_scatter_min_1a970f0ae60aca198d4ff561223d356190)` (const :: `[tensorflow::Scope](/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` ref, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` indices, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` updates, const `[ScatterMin::Attrs](/versions/r2.5/api_docs/cc/struct/tensorflow/ops/scatter-min/attrs#structtensorflow_1_1ops_1_1_scatter_min_1_1_attrs)` & attrs) ` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| ` `[operation](#classtensorflow_1_1ops_1_1_scatter_min_1a6b8f4f0a291a0a5110af72304126dfda)` ` | ` `[Operation](/versions/r2.5/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)` ` |\n| ` `[output_ref](#classtensorflow_1_1ops_1_1_scatter_min_1a246255cec7f7a96a7aaec14b4b44b6b7)` ` | ` :: `[tensorflow::Output](/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)` ` |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------------|--------------------------|\n| ` `[node](#classtensorflow_1_1ops_1_1_scatter_min_1ad2e63dcee002a733c8a1c255be7b2683)` () const ` | ` ::tensorflow::Node * ` |\n| ` `[operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_scatter_min_1a8938d32752649aeaeba42f68891ababc)` () const ` | ` ` |\n| ` `[operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_scatter_min_1af6605bb1184a6c918a33ba5d6389874b)` () const ` | ` ` |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[UseLocking](#classtensorflow_1_1ops_1_1_scatter_min_1a81d4614aac5d7b4ec68e2513034b2970)` (bool x) ` | ` `[Attrs](/versions/r2.5/api_docs/cc/struct/tensorflow/ops/scatter-min/attrs#structtensorflow_1_1ops_1_1_scatter_min_1_1_attrs)` ` |\n\n| ### Structs ||\n|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow:: ops:: ScatterMin:: Attrs](/versions/r2.5/api_docs/cc/struct/tensorflow/ops/scatter-min/attrs) | Optional attribute setters for [ScatterMin](/versions/r2.5/api_docs/cc/class/tensorflow/ops/scatter-min#classtensorflow_1_1ops_1_1_scatter_min) . |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output_ref\n\n```scdoc\n::tensorflow::Output output_ref\n``` \n\nPublic functions\n----------------\n\n### ScatterMin\n\n```gdscript\n ScatterMin(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input ref,\n ::tensorflow::Input indices,\n ::tensorflow::Input updates\n)\n``` \n\n### ScatterMin\n\n```gdscript\n ScatterMin(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input ref,\n ::tensorflow::Input indices,\n ::tensorflow::Input updates,\n const ScatterMin::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### UseLocking\n\n```text\nAttrs UseLocking(\n bool x\n)\n```"]]