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:: Giải mãJSONEví dụ
#include <parsing_ops.h>
Chuyển đổi các bản ghi ví dụ được mã hóa JSON thành chuỗi đệm giao thức nhị phân.
Bản tóm tắt
Hoạt động này dịch một tensor chứa các bản ghi Ví dụ, được mã hóa bằng cách sử dụng ánh xạ JSON tiêu chuẩn , thành một tensor chứa cùng các bản ghi được mã hóa dưới dạng bộ đệm giao thức nhị phân. Sau đó, tensor kết quả có thể được cung cấp cho bất kỳ hoạt động phân tích ví dụ nào khác.
Lập luận:
- phạm vi: Một đối tượng Phạm vi
- json_examples: Mỗi chuỗi là một đối tượng JSON được tuần tự hóa theo ánh xạ JSON của nguyên mẫu Ví dụ.
Trả về:
-
Output
: Mỗi chuỗi là một bộ đệm giao thức Ví dụ nhị phân tương ứng với phần tử tương ứng của json_examples
.
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-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::DecodeJSONExample Class Reference\n\ntensorflow::ops::DecodeJSONExample\n==================================\n\n`#include \u003cparsing_ops.h\u003e`\n\nConvert JSON-encoded Example records to binary protocol buffer strings.\n\nSummary\n-------\n\nThis op translates a tensor containing Example records, encoded using the [standard JSON mapping](https://developers.google.com/protocol-buffers/docs/proto3#json), into a tensor containing the same records encoded as binary protocol buffers. The resulting tensor can then be fed to any of the other Example-parsing ops.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- json_examples: Each string is a JSON object serialized according to the JSON mapping of the Example proto.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): Each string is a binary Example protocol buffer corresponding to the respective element of `json_examples`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [DecodeJSONExample](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1a5175fd5db2a3e172a06516fec3850efc)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` json_examples)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [binary_examples](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1ac6b3c22f94a224fac5ebd77479234283) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1aa94b74db4f2eca6c04a386e5c8174a04) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1a92b8985bc289f541f6e6b6c22385977d)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1acc4b898745eafcad0baf530183ec33c8)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_decode_j_s_o_n_example_1afc1fcbf55494127f3107e7901ebec32a)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### binary_examples\n\n```scdoc\n::tensorflow::Output binary_examples\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### DecodeJSONExample\n\n```gdscript\n DecodeJSONExample(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input json_examples\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```"]]