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:: cắt ngắnDiv
#include <math_ops.h>
Trả về phần tử x / y cho các kiểu số nguyên.
Bản tóm tắt
Việc cắt ngắn biểu thị rằng số âm sẽ làm tròn số lượng phân số về 0. Tức là -7/5 = -1. Điều này phù hợp với ngữ nghĩa C nhưng nó khác với ngữ nghĩa Python. Xem FloorDiv
để biết hàm phân chia phù hợp với Ngữ nghĩa Python.
LƯU Ý : TruncateDiv
hỗ trợ phát sóng. Tìm hiểu thêm về phát sóng tại đây
Lập luận:
Trả về:
Thuộc tính công khai
Chức năng công cộng
nút
::tensorflow::Node * node() const
operator::tensorflow::Input() const
toán tử::tenorflow::Đầu ra
operator::tensorflow::Output() const
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-27 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# tensorflow::ops::TruncateDiv Class Reference\n\ntensorflow::ops::TruncateDiv\n============================\n\n`#include \u003cmath_ops.h\u003e`\n\nReturns x / y element-wise for integer types.\n\nSummary\n-------\n\nTruncation designates that negative numbers will round fractional quantities toward zero. I.e. -7 / 5 = -1. This matches C semantics but it is different than Python semantics. See [FloorDiv](/versions/r2.2/api_docs/cc/class/tensorflow/ops/floor-div#classtensorflow_1_1ops_1_1_floor_div) for a division function that matches Python Semantics.\n\n*NOTE* : [TruncateDiv](/versions/r2.2/api_docs/cc/class/tensorflow/ops/truncate-div#classtensorflow_1_1ops_1_1_truncate_div) supports broadcasting. More about broadcasting [here](http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html)\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The z tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [TruncateDiv](#classtensorflow_1_1ops_1_1_truncate_div_1a85d194acc237ad25c4251ae3146881fc)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` y)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_truncate_div_1a7e0de478587246e3cbd2f20d632e1855) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [z](#classtensorflow_1_1ops_1_1_truncate_div_1ac337c45837a1c775c7cdb6f0507183a1) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_truncate_div_1a02a14b9ad45aae76def58326dcf595f4)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_truncate_div_1af97d794f682f7ae28fab09b5a090ffa5)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_truncate_div_1af687d5b0bf86a1f3d96743ec9a7b5525)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### z\n\n```text\n::tensorflow::Output z\n``` \n\nPublic functions\n----------------\n\n### TruncateDiv\n\n```gdscript\n TruncateDiv(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x,\n ::tensorflow::Input y\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]