เทนเซอร์โฟลว์:: สถานะ
#include <status.h>แสดงถึงความสำเร็จหรือความล้มเหลวของการโทรใน Tensorflow
สรุป
| ตัวสร้างและผู้ทำลาย | |
|---|---|
| Status () สร้างสถานะความสำเร็จ | |
| Status (tensorflow::error::Code code, tensorflow::StringPiece msg) สร้างสถานะด้วยรหัสข้อผิดพลาดที่ระบุและข้อความเป็นสตริงที่มนุษย์สามารถอ่านได้ซึ่งมีข้อมูลรายละเอียดเพิ่มเติม | |
| Status (const Status & s) คัดลอกสถานะที่ระบุ  | 
| งานสาธารณะ | |
|---|---|
| IgnoreError () const | void | 
| ToString () const | string ส่งกลับการแสดงสตริงของสถานะนี้ที่เหมาะสมสำหรับการพิมพ์ | 
| Update (const Status & new_status) | void | 
| code () const | tensorflow::error::Code | 
| error_message () const | const string & | 
| ok () const | bool คืนค่าเป็นจริงหากสถานะบ่งชี้ว่าสำเร็จ | 
| operator!= (const Status & x) const | bool | 
| operator= (const Status & s) | void | 
| operator== (const Status & x) const | bool | 
| ฟังก์ชันคงที่สาธารณะ | |
|---|---|
| OK () | |
งานสาธารณะ
ละเว้นข้อผิดพลาด
void IgnoreError() const
สถานะ
Status()
สร้างสถานะความสำเร็จ
สถานะ
Status( tensorflow::error::Code code, tensorflow::StringPiece msg )
สร้างสถานะด้วยรหัสข้อผิดพลาดที่ระบุและข้อความเป็นสตริงที่มนุษย์สามารถอ่านได้ซึ่งมีข้อมูลรายละเอียดเพิ่มเติม
ToString
string ToString() const
ส่งกลับการแสดงสตริงของสถานะนี้ที่เหมาะสมสำหรับการพิมพ์
 ส่งกลับสตริง "OK" เพื่อความสำเร็จ 
อัปเดต
void Update( const Status & new_status )
 ถ้า ok() จะเก็บ new_status ไว้ใน *this
 หาก !ok() จะคงสถานะปัจจุบันไว้ แต่อาจเสริมด้วยข้อมูลเพิ่มเติมเกี่ยวกับ new_status
 วิธีที่สะดวกในการติดตามข้อผิดพลาดแรกที่พบ แทน: if (overall_status.ok()) overall_status = new_status ใช้: overall_status.Update(new_status); 
รหัส
tensorflow::error::Code code() const
ข้อผิดพลาด_ข้อความ
const string & error_message() const
ตกลง
bool ok() const
คืนค่าเป็นจริงหากสถานะบ่งชี้ว่าสำเร็จ
โอเปอเรเตอร์!=
bool operator!=( const Status & x ) const
โอเปอเรเตอร์=
void operator=( const Status & s )
ตัวดำเนินการ==
bool operator==( const Status & x ) const
ฟังก์ชันคงที่สาธารณะ
ตกลง
Status OK()