컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: 참조 스위치
#include <control_flow_ops.h>
참조 텐서 data
pred
에 의해 결정된 출력 포트로 전달합니다.
요약
pred
가 true이면 data
입력이 output_true
로 전달됩니다. 그렇지 않으면 데이터는 output_false
로 이동합니다.
Switch
및 Merge
참고하십시오.
인수:
- 범위: 범위 개체
- data: 적절한 출력으로 전달될 참조 텐서입니다.
- pred: 데이터를 수신할 출력 포트를 지정하는 스칼라입니다.
보고:
-
Output
output_false: pred
가 false인 경우 데이터가 이 출력으로 전달됩니다. -
Output
Output_true: pred
가 true이면 데이터가 이 출력으로 전달됩니다.
공개 속성
공공 기능
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 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/r1.15/api_docs/cc/class/tensorflow/ops/switch#classtensorflow_1_1ops_1_1_switch) and [Merge](/versions/r1.15/api_docs/cc/class/tensorflow/ops/merge#classtensorflow_1_1ops_1_1_merge).\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/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/r1.15/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/r1.15/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/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` data, ::`[tensorflow::Input](/versions/r1.15/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/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output_false](#classtensorflow_1_1ops_1_1_ref_switch_1a070534567ff9bb630bfee0c600d75ae4) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [output_true](#classtensorflow_1_1ops_1_1_ref_switch_1ae47dda15cdabd3d3badf4eaadb5f91b7) | `::`[tensorflow::Output](/versions/r1.15/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```"]]