tensorflow :: Durum
#include <status.h>
Tensorflow'da bir aramanın başarılı veya başarısız olduğunu gösterir.
Özet
Yapıcılar ve Yıkıcılar | |
---|---|
Status () Bir başarı durumu oluşturun. | |
Status (tensorflow::error::Code code, tensorflow::StringPiece msg) Daha ayrıntılı bilgi içeren, insan tarafından okunabilir bir dize olarak belirtilen hata kodu ve msg ile bir durum oluşturun. | |
Status (const Status & s) Belirtilen durumu kopyalayın. |
Kamusal işlevler | |
---|---|
IgnoreError () const | void |
ToString () const | string Bu durumun yazdırmaya uygun bir dize gösterimini döndürür. |
Update (const Status & new_status) | void |
code () const | tensorflow::error::Code |
error_message () const | const string & |
ok () const | bool Durum başarıya işaret ederse doğru döndürür. |
operator!= (const Status & x) const | bool |
operator= (const Status & s) | void |
operator== (const Status & x) const | bool |
Genel statik işlevler | |
---|---|
OK () |
Kamusal işlevler
Hatayı Yoksay
void IgnoreError() const
Durum
Status()
Bir başarı durumu oluşturun.
Durum
Status( tensorflow::error::Code code, tensorflow::StringPiece msg )
Daha ayrıntılı bilgi içeren, insan tarafından okunabilir bir dize olarak belirtilen hata kodu ve msg ile bir durum oluşturun.
ToString
string ToString() const
Bu durumun yazdırmaya uygun bir dize gösterimini döndürür.
Başarı için "OK"
dizesini döndürür.
Güncelleme
void Update( const Status & new_status )
ok()
, new_status
*this
içine saklar.
Eğer !ok()
, mevcut durumu korur, ancak new_status
hakkında ek bilgilerle new_status
.
Karşılaşılan ilk hatayı takip etmenin uygun yolu. Bunun yerine: if (overall_status.ok()) overall_status = new_status
Kullanın: overall_status.Update(new_status);
kodu
tensorflow::error::Code code() const
hata mesajı
const string & error_message() const
Tamam mı
bool ok() const
Durum başarıya işaret ederse doğru döndürür.
operatör! =
bool operator!=( const Status & x ) const
operatör =
void operator=( const Status & s )
operatör ==
bool operator==( const Status & x ) const
Genel statik işlevler
TAMAM MI
Status OK()