تدفق التوتر:: العمليات:: استعادة شريحة
#include <io_ops.h>
يستعيد الموتر من ملفات نقاط التفتيش.
ملخص
هذا يشبه Restore
باستثناء أنه يمكن إدراج الموتر المستعاد على أنه يملأ فقط شريحة من موتر أكبر. يحدد shape_and_slice
شكل الموتر الأكبر والشريحة التي يغطيها الموتر المستعاد.
يحتوي إدخال shape_and_slice
على نفس تنسيق عناصر إدخال shapes_and_slices
في عملية SaveSlices
.
الحجج:
- النطاق: كائن النطاق
- file_pattern: يجب أن يحتوي على عنصر واحد. نمط الملفات التي نقرأ منها الموتر.
- Tensor_name: يجب أن يحتوي على عنصر واحد. اسم الموتر المراد استعادته.
- Shape_and_slice: عددي. الأشكال ومواصفات الشريحة المستخدمة عند استعادة الموترات.
- dt: نوع الموتر المراد استعادته.
السمات الاختيارية (انظر Attrs
):
- Favorite_shard: فهرس الملف الذي سيتم فتحه أولاً إذا كانت هناك ملفات متعددة تتطابق مع
file_pattern
. راجع وثائقRestore
.
العوائد:
-
Output
: الموتر المستعاد.
البنائين والمدمرين | |
---|---|
RestoreSlice (const :: tensorflow::Scope & scope, :: tensorflow::Input file_pattern, :: tensorflow::Input tensor_name, :: tensorflow::Input shape_and_slice, DataType dt) | |
RestoreSlice (const :: tensorflow::Scope & scope, :: tensorflow::Input file_pattern, :: tensorflow::Input tensor_name, :: tensorflow::Input shape_and_slice, DataType dt, const RestoreSlice::Attrs & attrs) |
الصفات العامة | |
---|---|
operation | |
tensor |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
وظائف ثابتة العامة | |
---|---|
PreferredShard (int64 x) |
الهياكل | |
---|---|
Tensorflow:: ops:: RestoreSlice:: Attrs | محددات السمات الاختيارية لـ RestoreSlice . |
الصفات العامة
عملية
Operation operation
الموتر
::tensorflow::Output tensor
الوظائف العامة
استعادة شريحة
RestoreSlice( const ::tensorflow::Scope & scope, ::tensorflow::Input file_pattern, ::tensorflow::Input tensor_name, ::tensorflow::Input shape_and_slice, DataType dt )
استعادة شريحة
RestoreSlice( const ::tensorflow::Scope & scope, ::tensorflow::Input file_pattern, ::tensorflow::Input tensor_name, ::tensorflow::Input shape_and_slice, DataType dt, const RestoreSlice::Attrs & attrs )
العقدة
::tensorflow::Node * node() const
المشغل::tensorflow::الإدخال
operator::tensorflow::Input() const
المشغل::tensorflow::الإخراج
operator::tensorflow::Output() const
وظائف ثابتة العامة
مفضلشارد
Attrs PreferredShard( int64 x )
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# tensorflow::ops::RestoreSlice Class Reference\n\ntensorflow::ops::RestoreSlice\n=============================\n\n`#include \u003cio_ops.h\u003e`\n\nRestores a tensor from checkpoint files.\n\nSummary\n-------\n\nThis is like [Restore](/versions/r2.3/api_docs/cc/class/tensorflow/ops/restore#classtensorflow_1_1ops_1_1_restore) except that restored tensor can be listed as filling only a slice of a larger tensor. `shape_and_slice` specifies the shape of the larger tensor and the slice that the restored tensor covers.\n\nThe `shape_and_slice` input has the same format as the elements of the `shapes_and_slices` input of the [SaveSlices](/versions/r2.3/api_docs/cc/class/tensorflow/ops/save-slices#classtensorflow_1_1ops_1_1_save_slices) op.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.3/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- shape_and_slice: Scalar. The shapes and slice specifications to use when restoring a tensors.\n- dt: The type of the tensor to be restored.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/restore-slice/attrs#structtensorflow_1_1ops_1_1_restore_slice_1_1_attrs)):\n\n- preferred_shard: Index of file to open first if multiple files match `file_pattern`. See the documentation for [Restore](/versions/r2.3/api_docs/cc/class/tensorflow/ops/restore#classtensorflow_1_1ops_1_1_restore).\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The restored tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [RestoreSlice](#classtensorflow_1_1ops_1_1_restore_slice_1a2d2ed9358de458c5ac241a0b49dd0389)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` file_pattern, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` tensor_name, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` shape_and_slice, DataType dt)` ||\n| [RestoreSlice](#classtensorflow_1_1ops_1_1_restore_slice_1a901a12a32fed966841204972e978f1e2)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` file_pattern, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` tensor_name, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` shape_and_slice, DataType dt, const `[RestoreSlice::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/restore-slice/attrs#structtensorflow_1_1ops_1_1_restore_slice_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_restore_slice_1a2e52156c6ad72a0c59d36634c5a00fc2) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [tensor](#classtensorflow_1_1ops_1_1_restore_slice_1a4edd358a8874c36fb6833d1ede49ea5b) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_restore_slice_1a8fd0b9d2345f9764bce4bf60b909df4e)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_restore_slice_1a5b9012c2e1217bc1dee69a95451e7897)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_restore_slice_1aa5b92a74357789547971721a0725640b)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-----------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| [PreferredShard](#classtensorflow_1_1ops_1_1_restore_slice_1ab8d2e2b14f8caab4f86d94957df53eef)`(int64 x)` | [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/restore-slice/attrs#structtensorflow_1_1ops_1_1_restore_slice_1_1_attrs) |\n\n| ### Structs ||\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::RestoreSlice::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/restore-slice/attrs) | Optional attribute setters for [RestoreSlice](/versions/r2.3/api_docs/cc/class/tensorflow/ops/restore-slice#classtensorflow_1_1ops_1_1_restore_slice). |\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### RestoreSlice\n\n```gdscript\n RestoreSlice(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input file_pattern,\n ::tensorflow::Input tensor_name,\n ::tensorflow::Input shape_and_slice,\n DataType dt\n)\n``` \n\n### RestoreSlice\n\n```gdscript\n RestoreSlice(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input file_pattern,\n ::tensorflow::Input tensor_name,\n ::tensorflow::Input shape_and_slice,\n DataType dt,\n const RestoreSlice::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```"]]