จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: ว่างเปล่า
#include <array_ops.h>
สร้างเทนเซอร์ตามรูปร่างที่กำหนด
สรุป
การดำเนินการนี้จะสร้างเทนเซอร์ของ shape
และ dtype
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- รูปร่าง: 1-D แสดงถึงรูปร่างของเทนเซอร์เอาท์พุต
แอ็ตทริบิวต์ทางเลือก (ดู Attrs
):
- init: หากเป็น True ให้เตรียมใช้งานเทนเซอร์ที่ส่งคืนด้วยค่าเริ่มต้นเป็น dtype มิฉะนั้น การนำไปปฏิบัตินั้นฟรีที่จะไม่เริ่มต้นเนื้อหาของเทนเซอร์
ผลตอบแทน:
ฟังก์ชันคงที่สาธารณะ |
---|
Init (bool x) | |
คุณลักษณะสาธารณะ
งานสาธารณะ
โหนด
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const
ฟังก์ชันคงที่สาธารณะ
เริ่มต้น
Attrs Init(
bool x
)
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# tensorflow::ops::Empty Class Reference\n\ntensorflow::ops::Empty\n======================\n\n`#include \u003carray_ops.h\u003e`\n\nCreates a tensor with the given shape.\n\nSummary\n-------\n\nThis operation creates a tensor of `shape` and `dtype`.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- shape: 1-D. Represents the shape of the output tensor.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/empty/attrs#structtensorflow_1_1ops_1_1_empty_1_1_attrs)):\n\n- init: If True, initialize the returned tensor with the default value of dtype. Otherwise, the implementation is free not to initializethe tensor's content.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of type `T`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Empty](#classtensorflow_1_1ops_1_1_empty_1afbeeb90876baaa5131ccd9ae1a733689)`(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)` shape, DataType dtype)` ||\n| [Empty](#classtensorflow_1_1ops_1_1_empty_1a17ea31d51cede367a541675480d77a3f)`(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)` shape, DataType dtype, const `[Empty::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/empty/attrs#structtensorflow_1_1ops_1_1_empty_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_empty_1ae377e8630513546e65d719d56ecfe136) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_empty_1a9c7d05401a0aa67f82fe592682f0bc15) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_empty_1a4fdbda6ce5b2f476acc70ada9df3eaa2)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_empty_1ac54e9b4ae90bf596166c770dc6d22ce5)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_empty_1a9ae3f6fbe95cde1fcec65896b5397511)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| [Init](#classtensorflow_1_1ops_1_1_empty_1ac0b3b4819671ba0dd14c7ca6c1bacae4)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/empty/attrs#structtensorflow_1_1ops_1_1_empty_1_1_attrs) |\n\n| ### Structs ||\n|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::Empty::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/empty/attrs) | Optional attribute setters for [Empty](/versions/r1.15/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### Empty\n\n```gdscript\n Empty(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input shape,\n DataType dtype\n)\n``` \n\n### Empty\n\n```gdscript\n Empty(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input shape,\n DataType dtype,\n const Empty::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### Init\n\n```text\nAttrs Init(\n bool x\n)\n```"]]