جریان تنسور:: عملیات:: DestroyTemporaryVariable
#include <state_ops.h>
متغیر موقت را از بین می برد و مقدار نهایی آن را برمی گرداند.
خلاصه
خروجی را روی مقدار Tensor که با «ref» به آن اشاره شده است تنظیم می کند، سپس متغیر موقتی به نام «var_name» را از بین می برد. همه کاربردهای دیگر «ref» باید قبل از این عملیات اجرا شده باشند. این معمولاً با زنجیر کردن ref از طریق هر عملیات اختصاصی یا با استفاده از وابستگیهای کنترلی به دست میآید.
مقدار نهایی تانسور را که با "ref" به آن اشاره شده است را خروجی می دهد.
استدلال ها:
- scope: یک شی Scope
- ref: اشاره به تانسور متغیر موقت.
- var_name: نام متغیر موقت، معمولاً نام منطبق بر " TemporaryVariable " op.
برمی گرداند:
صفات عمومی
عملیات
Operation operation
ارزش
::tensorflow::Output value
توابع عمومی
DestroyTemporaryVariable
DestroyTemporaryVariable(
const ::tensorflow::Scope & scope,
::tensorflow::Input ref,
StringPiece var_name
)
گره
::tensorflow::Node * node() const
operator::tensorflow::Input() const
عملگر::tensorflow::خروجی
operator::tensorflow::Output() const
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-27 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-27 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# tensorflow::ops::DestroyTemporaryVariable Class Reference\n\ntensorflow::ops::DestroyTemporaryVariable\n=========================================\n\n`#include \u003cstate_ops.h\u003e`\n\nDestroys the temporary variable and returns its final value.\n\nSummary\n-------\n\nSets output to the value of the [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) pointed to by 'ref', then destroys the temporary variable called 'var_name'. [All](/versions/r2.2/api_docs/cc/class/tensorflow/ops/all#classtensorflow_1_1ops_1_1_all) other uses of 'ref' *must* have executed before this op. This is typically achieved by chaining the ref through each assign op, or by using control dependencies.\n\nOutputs the final value of the tensor pointed to by 'ref'.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- ref: A reference to the temporary variable tensor.\n- var_name: Name of the temporary variable, usually the name of the matching '[TemporaryVariable](/versions/r2.2/api_docs/cc/class/tensorflow/ops/temporary-variable#classtensorflow_1_1ops_1_1_temporary_variable)' op.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The value tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [DestroyTemporaryVariable](#classtensorflow_1_1ops_1_1_destroy_temporary_variable_1a01f12d953d9078e0133345ecad76f629)`(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)` ref, StringPiece var_name)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_destroy_temporary_variable_1a0bfa0ecb725488b9065e4dfa42addfdc) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [value](#classtensorflow_1_1ops_1_1_destroy_temporary_variable_1a2a3151dd005ff60e1fbc92d9f72c51d0) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_destroy_temporary_variable_1ab3002dc3d20c1e4e20f1fb219714c7e8)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_destroy_temporary_variable_1a36cd6c9de3fec498a9b6f32078402e1a)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_destroy_temporary_variable_1a94ad142b7443111409db522488894175)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### value\n\n```text\n::tensorflow::Output value\n``` \n\nPublic functions\n----------------\n\n### DestroyTemporaryVariable\n\n```gdscript\n DestroyTemporaryVariable(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input ref,\n StringPiece var_name\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```"]]