tensorflow:: אופס:: RefSwitch
#include <control_flow_ops.h>
מעביר את data
טנזור ה-ref ליציאת הפלט שנקבעה על ידי pred
.
תַקצִיר
אם pred
נכון, קלט data
מועבר ל- output_true
. אחרת, הנתונים עוברים אל output_false
.
טיעונים:
- scope: אובייקט Scope
- נתונים: טנזור ה-ref שיועבר לפלט המתאים.
- pred: סקלאר המציין איזו יציאת פלט תקבל נתונים.
החזרות:
-
Output
output_false: אםpred
הוא false, הנתונים יועברו לפלט זה. -
Output
output_true: אםpred
הוא אמת, הנתונים יועברו לפלט זה.
בנאים והורסים | |
---|---|
RefSwitch (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input pred) |
תכונות ציבוריות | |
---|---|
operation | |
output_false | |
output_true |
תכונות ציבוריות
מִבצָע
Operation operation
output_false
::tensorflow::Output output_false
output_true
::tensorflow::Output output_true
תפקידים ציבוריים
RefSwitch
RefSwitch( const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input pred )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],[],null,["# tensorflow::ops::RefSwitch Class Reference\n\ntensorflow::ops::RefSwitch\n==========================\n\n`#include \u003ccontrol_flow_ops.h\u003e`\n\nForwards the ref tensor `data` to the output port determined by `pred`.\n\nSummary\n-------\n\nIf `pred` is true, the `data` input is forwarded to `output_true`. Otherwise, the data goes to `output_false`.\n\nSee also [Switch](/versions/r2.2/api_docs/cc/class/tensorflow/ops/switch#classtensorflow_1_1ops_1_1_switch) and [Merge](/versions/r2.2/api_docs/cc/class/tensorflow/ops/merge#classtensorflow_1_1ops_1_1_merge).\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- data: The ref tensor to be forwarded to the appropriate output.\n- pred: A scalar that specifies which output port will receive data.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_false: If `pred` is false, data will be forwarded to this output.\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_true: If `pred` is true, data will be forwarded to this output.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [RefSwitch](#classtensorflow_1_1ops_1_1_ref_switch_1a6776369f0966446feb0aa0f9d413aba0)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` data, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` pred)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_ref_switch_1a2ccd0f134fb8e9af48737d5ba0434056) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output_false](#classtensorflow_1_1ops_1_1_ref_switch_1a070534567ff9bb630bfee0c600d75ae4) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [output_true](#classtensorflow_1_1ops_1_1_ref_switch_1ae47dda15cdabd3d3badf4eaadb5f91b7) | `::`[tensorflow::Output](/versions/r2.2/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_false\n\n```scdoc\n::tensorflow::Output output_false\n``` \n\n### output_true\n\n```scdoc\n::tensorflow::Output output_true\n``` \n\nPublic functions\n----------------\n\n### RefSwitch\n\n```gdscript\n RefSwitch(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input data,\n ::tensorflow::Input pred\n)\n```"]]