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