সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: পুনরুদ্ধার করুন
#include <io_ops.h>
চেকপয়েন্ট ফাইল থেকে একটি টেনসর পুনরুদ্ধার করে।
সারাংশ
এক বা একাধিক ফাইলে সংরক্ষিত একটি টেনসর পড়ে। যদি বেশ কয়েকটি ফাইল থাকে (উদাহরণস্বরূপ একটি টেনসরকে স্লাইস হিসাবে সংরক্ষণ করা হয়েছিল), file_pattern
ওয়াইল্ডকার্ড চিহ্ন থাকতে পারে ( *
এবং ?
) শুধুমাত্র ফাইলের নাম অংশে, ডিরেক্টরি অংশে নয়।
যদি একটি file_pattern
বেশ কয়েকটি ফাইলের সাথে মিলে যায়, তাহলে preferred_shard
ব্যবহার করা যেতে পারে ইঙ্গিত করার জন্য যে কোন ফাইলে অনুরোধ করা টেনসরটি পাওয়া যাবে। এই অপশনটি প্রথমে মিলিত ফাইলের তালিকার index preferred_shard
এ ফাইলটি খুলবে এবং সেই ফাইল থেকে টেনসর পুনরুদ্ধার করার চেষ্টা করবে। শুধুমাত্র যদি কিছু টেনসর বা টেনসর স্লাইস সেই প্রথম ফাইলে পাওয়া না যায়, তাহলে Op সমস্ত ফাইল খোলে। একটি মিলে যাওয়া Save
Op-এর shard
ইনপুট হিসাবে পাস করা মানের সাথে মেলে preferred_shard
সেট করা পুনরুদ্ধারের গতি বাড়িয়ে দিতে পারে। এই বৈশিষ্ট্য শুধুমাত্র কর্মক্ষমতা প্রভাবিত করে, সঠিকতা নয়। ডিফল্ট মান -1 মানে ফাইলগুলি ক্রমানুসারে প্রক্রিয়া করা হয়।
এছাড়াও দেখুন RestoreSlice
.
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- file_pattern: একটি একক উপাদান থাকতে হবে। যে ফাইলগুলি থেকে আমরা টেনসর পড়ি তার প্যাটার্ন।
- tensor_name: একটি একক উপাদান থাকতে হবে। পুনঃস্থাপন করা টেনসরের নাম।
- dt: টেনসরের ধরন পুনরুদ্ধার করা হবে।
ঐচ্ছিক বৈশিষ্ট্য (দেখুন Attrs
):
- preferred_shard: একাধিক ফাইল
file_pattern
সাথে মিলে গেলে প্রথমে খোলার জন্য ফাইলের সূচী।
রিটার্ন:
-
Output
: পুনরুদ্ধার করা টেনসর।
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
নোড
::tensorflow::Node * node() const
operator::tensorflow::Input() const
অপারেটর::টেনসরফ্লো::আউটপুট
operator::tensorflow::Output() const
পাবলিক স্ট্যাটিক ফাংশন
PreferredShard
Attrs PreferredShard(
int64 x
)
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-27 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-27 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# tensorflow::ops::Restore Class Reference\n\ntensorflow::ops::Restore\n========================\n\n`#include \u003cio_ops.h\u003e`\n\nRestores a tensor from checkpoint files.\n\nSummary\n-------\n\nReads a tensor stored in one or several files. If there are several files (for instance because a tensor was saved as slices), `file_pattern` may contain wildcard symbols (`*` and `?`) in the filename portion only, not in the directory portion.\n\nIf a `file_pattern` matches several files, `preferred_shard` can be used to hint in which file the requested tensor is likely to be found. This op will first open the file at index `preferred_shard` in the list of matching files and try to restore tensors from that file. Only if some tensors or tensor slices are not found in that first file, then the Op opens all the files. Setting `preferred_shard` to match the value passed as the `shard` input of a matching [Save](/versions/r2.2/api_docs/cc/class/tensorflow/ops/save#classtensorflow_1_1ops_1_1_save) Op may speed up [Restore](/versions/r2.2/api_docs/cc/class/tensorflow/ops/restore#classtensorflow_1_1ops_1_1_restore). This attribute only affects performance, not correctness. The default value -1 means files are processed in order.\n\nSee also [RestoreSlice](/versions/r2.2/api_docs/cc/class/tensorflow/ops/restore-slice#classtensorflow_1_1ops_1_1_restore_slice).\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- file_pattern: Must have a single element. The pattern of the files from which we read the tensor.\n- tensor_name: Must have a single element. The name of the tensor to be restored.\n- dt: The type of the tensor to be restored.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/restore/attrs#structtensorflow_1_1ops_1_1_restore_1_1_attrs)):\n\n- preferred_shard: Index of file to open first if multiple files match `file_pattern`.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The restored tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Restore](#classtensorflow_1_1ops_1_1_restore_1a06392cfeb62e5bbcd5a12c8c24f4a454)`(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)` file_pattern, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` tensor_name, DataType dt)` ||\n| [Restore](#classtensorflow_1_1ops_1_1_restore_1a6bc04bd5b6925c42d2ab9fac0d053774)`(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)` file_pattern, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` tensor_name, DataType dt, const `[Restore::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/restore/attrs#structtensorflow_1_1ops_1_1_restore_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_restore_1a512f0dcb5d23dea3939e1086b78490c9) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [tensor](#classtensorflow_1_1ops_1_1_restore_1a7d6ad76f209f846683849ffcf4e5b2f9) | `::`[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_restore_1a6b5a77883f915a4b7e800cbda2f6b18a)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_restore_1a20bb2f66a51a1413dda2b18f7880983f)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_restore_1ab93346099735ce634a6caa5d98b8785d)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| [PreferredShard](#classtensorflow_1_1ops_1_1_restore_1afca86c5066310bcef8e07db991a9df2f)`(int64 x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/restore/attrs#structtensorflow_1_1ops_1_1_restore_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::Restore::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/restore/attrs) | Optional attribute setters for [Restore](/versions/r2.2/api_docs/cc/class/tensorflow/ops/restore#classtensorflow_1_1ops_1_1_restore). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### tensor\n\n```text\n::tensorflow::Output tensor\n``` \n\nPublic functions\n----------------\n\n### Restore\n\n```gdscript\n Restore(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input file_pattern,\n ::tensorflow::Input tensor_name,\n DataType dt\n)\n``` \n\n### Restore\n\n```gdscript\n Restore(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input file_pattern,\n ::tensorflow::Input tensor_name,\n DataType dt,\n const Restore::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### PreferredShard\n\n```text\nAttrs PreferredShard(\n int64 x\n)\n```"]]