จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: กำหนด:: คุณสมบัติ
#include <state_ops.h>
ตัวตั้งค่าแอตทริบิวต์เพิ่มเติมสำหรับ Assign
สรุป
งานสาธารณะ |
---|
UseLocking (bool x) | ถ้าเป็น True งานที่ได้รับมอบหมายจะได้รับการปกป้องด้วยการล็อค มิฉะนั้นพฤติกรรมจะไม่ได้กำหนดไว้ แต่อาจแสดงความขัดแย้งน้อยลง |
ValidateShape (bool x) | หากเป็นจริง การดำเนินการจะตรวจสอบว่ารูปร่างของ 'ค่า' ตรงกับรูปร่างของ เทนเซอร์ ที่ได้รับมอบหมาย |
คุณลักษณะสาธารณะ
use_locking_
bool tensorflow::ops::Assign::Attrs::use_locking_ = true
ตรวจสอบ_รูปร่าง_
bool tensorflow::ops::Assign::Attrs::validate_shape_ = true
งานสาธารณะ
ใช้ล็อค
TF_MUST_USE_RESULT Attrs tensorflow::ops::Assign::Attrs::UseLocking(
bool x
)
ถ้าเป็น True งานที่ได้รับมอบหมายจะได้รับการปกป้องด้วยการล็อค มิฉะนั้นพฤติกรรมจะไม่ได้กำหนดไว้ แต่อาจแสดงความขัดแย้งน้อยลง
ค่าเริ่มต้นเป็นจริง
ตรวจสอบรูปร่าง
TF_MUST_USE_RESULT Attrs tensorflow::ops::Assign::Attrs::ValidateShape(
bool x
)
หากเป็นจริง การดำเนินการจะตรวจสอบว่ารูปร่างของ 'ค่า' ตรงกับรูปร่างของ เทนเซอร์ ที่ได้รับมอบหมาย
หากเป็นเท็จ 'ref' จะอยู่ในรูปของ 'value'
ค่าเริ่มต้นเป็นจริง
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# tensorflow::ops::Assign::Attrs Struct Reference\n\ntensorflow::ops::Assign::Attrs\n==============================\n\n`#include \u003cstate_ops.h\u003e`\n\nOptional attribute setters for [Assign](/versions/r1.15/api_docs/cc/class/tensorflow/ops/assign#classtensorflow_1_1ops_1_1_assign).\n\nSummary\n-------\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------------------|--------|\n| [use_locking_](#structtensorflow_1_1ops_1_1_assign_1_1_attrs_1ae9bf9c16623a4261e299eb784f104eb4)` = true` | `bool` |\n| [validate_shape_](#structtensorflow_1_1ops_1_1_assign_1_1_attrs_1a3401025d0470b42ec167e96408de3091)` = true` | `bool` |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [UseLocking](#structtensorflow_1_1ops_1_1_assign_1_1_attrs_1a0d9dfa31afce496359a0994b6c1e43ea)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/assign/attrs#structtensorflow_1_1ops_1_1_assign_1_1_attrs) If True, the assignment will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention. |\n| [ValidateShape](#structtensorflow_1_1ops_1_1_assign_1_1_attrs_1a6c63cacd6cce8eabbbb01ffd3ca16746)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/assign/attrs#structtensorflow_1_1ops_1_1_assign_1_1_attrs) If true, the operation will validate that the shape of 'value' matches the shape of the [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) being assigned to. |\n\nPublic attributes\n-----------------\n\n### use_locking_\n\n```scdoc\nbool tensorflow::ops::Assign::Attrs::use_locking_ = true\n``` \n\n### validate_shape_\n\n```scdoc\nbool tensorflow::ops::Assign::Attrs::validate_shape_ = true\n``` \n\nPublic functions\n----------------\n\n### UseLocking\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::Assign::Attrs::UseLocking(\n bool x\n)\n``` \nIf True, the assignment will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.\n\nDefaults to true \n\n### ValidateShape\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::Assign::Attrs::ValidateShape(\n bool x\n)\n``` \nIf true, the operation will validate that the shape of 'value' matches the shape of the [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) being assigned to.\n\nIf false, 'ref' will take on the shape of 'value'.\n\nDefaults to true"]]