Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::
ops::
Merge
#include <control_flow_ops.h>
Forwards the value of an available tensor from
inputs
to
output
.
Summary
Merge
waits for at least one of the tensors in
inputs
to become available. It is usually combined with
Switch
to implement branching.
Merge
forwards the first tensor to become available to
output
, and sets
value_index
to its index in
inputs
.
Args:
-
scope: A
Scope
object
-
inputs: The input tensors, exactly one of which will become available.
Returns:
-
Output
output: Will be set to the available input tensor.
-
Output
value_index: The index of the chosen input tensor in
inputs
.
Public attributes
Public functions
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::Merge Class Reference\n\ntensorflow::\nops::\nMerge\n========================\n\n`\n#include \u003ccontrol_flow_ops.h\u003e\n`\n\n\nForwards the value of an available tensor from\n`\ninputs\n`\nto\n`\noutput\n`\n.\n\nSummary\n-------\n\n\n`\n`[Merge](/versions/r2.5/api_docs/cc/class/tensorflow/ops/merge#classtensorflow_1_1ops_1_1_merge)`\n`\nwaits for at least one of the tensors in\n`\ninputs\n`\nto become available. It is usually combined with\n`\n`[Switch](/versions/r2.5/api_docs/cc/class/tensorflow/ops/switch#classtensorflow_1_1ops_1_1_switch)`\n`\nto implement branching.\n\n\n`\n`[Merge](/versions/r2.5/api_docs/cc/class/tensorflow/ops/merge#classtensorflow_1_1ops_1_1_merge)`\n`\nforwards the first tensor to become available to\n`\noutput\n`\n, and sets\n`\nvalue_index\n`\nto its index in\n`\ninputs\n`\n.\n\n\nArgs:\n\n- scope: A [Scope](/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- inputs: The input tensors, exactly one of which will become available.\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 ` output: Will be set to the available input tensor.\n- `\n `[Output](/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)`\n ` value_index: The index of the chosen input tensor in `\n inputs\n ` .\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| ` `[Merge](#classtensorflow_1_1ops_1_1_merge_1a72704c3d1bf64aedb9bd82724f228c2a)` (const :: `[tensorflow::Scope](/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, :: `[tensorflow::InputList](/versions/r2.5/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` inputs) ` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| ` `[operation](#classtensorflow_1_1ops_1_1_merge_1a3c9561c2129cfb34d16e93ebf40f9b73)` ` | ` `[Operation](/versions/r2.5/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)` ` |\n| ` `[output](#classtensorflow_1_1ops_1_1_merge_1ab0c85516a5cbe032d96abc1064a8fd9e)` ` | ` :: `[tensorflow::Output](/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)` ` |\n| ` `[value_index](#classtensorflow_1_1ops_1_1_merge_1a354d34167c730ae8b9acf23087558904)` ` | ` :: `[tensorflow::Output](/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\n### value_index\n\n```scdoc\n::tensorflow::Output value_index\n``` \n\nPublic functions\n----------------\n\n### Merge\n\n```gdscript\n Merge(\n const ::tensorflow::Scope & scope,\n ::tensorflow::InputList inputs\n)\n```"]]