TensorFlow教程之API DOC 6.1.5 Class tensorflow::Status

    xiaoxiao2021-07-23  252

    本文档为TensorFlow参考文档,本转载已得到TensorFlow中文社区授权。

    Class tensorflow::Status

    Member Summary

    tensorflow::Status::Status() Create a success status.tensorflow::Status::~Status() tensorflow::Status::Status(tensorflow::error::Code code, tensorflow::StringPiece msg) Create a status with the specified error code and msg as a human-readable string containing more detailed information. tensorflow::Status::Status(const Status &s) Copy the specified status.void tensorflow::Status::operator=(const Status &s) bool tensorflow::Status::ok() const Returns true iff the status indicates success.tensorflow::error::Code tensorflow::Status::code() constconst string& tensorflow::Status::error_message() constbool tensorflow::Status::operator==(const Status &x) constbool tensorflow::Status::operator!=(const Status &x) const void tensorflow::Status::Update(const Status &new_status) If ok(), stores new_status into *this. If !ok(), preserves the current status, but may augment with additional information about new_status. string tensorflow::Status::ToString() const Return a string representation of this status suitable for printing. Returns the string "OK" for success.static Status tensorflow::Status::OK()

    Member Details

    tensorflow::Status::Status()

    Create a success status.

    tensorflow::Status::~Status()

    tensorflow::Status::Status(tensorflow::error::Code code, tensorflow::StringPiece msg)

    Create a status with the specified error code and msg as a human-readable string containing more detailed information.

    tensorflow::Status::Status(const Status &s)

    Copy the specified status.

    void tensorflow::Status::operator=(const Status &s)

    bool tensorflow::Status::ok() const

    Returns true iff the status indicates success.

    tensorflow::error::Code tensorflow::Status::code() const

    const string& tensorflow::Status::error_message() const

    bool tensorflow::Status::operator==(const Status &x) const

    bool tensorflow::Status::operator!=(const Status &x) const

    void tensorflow::Status::Update(const Status &new_status)

    If ok(), stores new_status into *this. If !ok(), preserves the current status, but may augment with additional information about new_status.

    Convenient way of keeping track of the first error encountered. Instead of: if (overall_status.ok()) overall_status = new_status Use: overall_status.Update(new_status);

    string tensorflow::Status::ToString() const

    Return a string representation of this status suitable for printing. Returns the string "OK" for success.

    static Status tensorflow::Status::OK()

    相关资源:七夕情人节表白HTML源码(两款)

    最新回复(0)