Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
dòng chảy căng:: ôi:: Hủy bỏ
#include <control_flow_ops.h>
Đưa ra một ngoại lệ để hủy bỏ quá trình khi được gọi.
Bản tóm tắt
Nếu exit_without_error là đúng, quá trình sẽ thoát bình thường, nếu không nó sẽ thoát với tín hiệu SIGABORT.
Không trả về gì ngoài một ngoại lệ.
Lập luận:
Thuộc tính tùy chọn (xem Attrs
):
- error_msg: Một chuỗi là thông báo liên quan đến ngoại lệ.
Trả về:
Thuộc tính công khai
Chức năng công cộng
toán tử::tenorflow::Hoạt động
operator::tensorflow::Operation() const
Các hàm tĩnh công khai
Tin nhắn lỗi
Attrs ErrorMsg(
StringPiece x
)
Thoát mà không có lỗi
Attrs ExitWithoutError(
bool x
)
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::Abort Class Reference\n\ntensorflow::ops::Abort\n======================\n\n`#include \u003ccontrol_flow_ops.h\u003e`\n\nRaise a exception to abort the process when called.\n\nSummary\n-------\n\nIf exit_without_error is true, the process will exit normally, otherwise it will exit with a SIGABORT signal.\n\nReturns nothing but an exception.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/abort/attrs#structtensorflow_1_1ops_1_1_abort_1_1_attrs)):\n\n- error_msg: A string which is the message associated with the exception.\n\n\u003cbr /\u003e\n\nReturns:\n\n- the created [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Abort](#classtensorflow_1_1ops_1_1_abort_1ae3e887b2d01e7ca0d7b542402fb6109c)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope)` ||\n| [Abort](#classtensorflow_1_1ops_1_1_abort_1a454530dc73efb0c918895564c3a1c3aa)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, const `[Abort::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/abort/attrs#structtensorflow_1_1ops_1_1_abort_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_abort_1a03764bd8e9c8d8208fb5326499a82414) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------|---------|\n| [operator::tensorflow::Operation](#classtensorflow_1_1ops_1_1_abort_1a81e311c61ceced865499b5c3a685a974)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| [ErrorMsg](#classtensorflow_1_1ops_1_1_abort_1a93fa562bb7d000cf7568e9995a67757b)`(StringPiece x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/abort/attrs#structtensorflow_1_1ops_1_1_abort_1_1_attrs) |\n| [ExitWithoutError](#classtensorflow_1_1ops_1_1_abort_1af4eb7322975126f0aeb2fee41d05ddd9)`(bool x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/abort/attrs#structtensorflow_1_1ops_1_1_abort_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::Abort::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/abort/attrs) | Optional attribute setters for [Abort](/versions/r2.1/api_docs/cc/class/tensorflow/ops/abort#classtensorflow_1_1ops_1_1_abort). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### Abort\n\n```gdscript\n Abort(\n const ::tensorflow::Scope & scope\n)\n``` \n\n### Abort\n\n```gdscript\n Abort(\n const ::tensorflow::Scope & scope,\n const Abort::Attrs & attrs\n)\n``` \n\n### operator::tensorflow::Operation\n\n```gdscript\n operator::tensorflow::Operation() const \n``` \n\nPublic static functions\n-----------------------\n\n### ErrorMsg\n\n```text\nAttrs ErrorMsg(\n StringPiece x\n)\n``` \n\n### ExitWithoutError\n\n```text\nAttrs ExitWithoutError(\n bool x\n)\n```"]]