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:: Mã hóaBase64
#include <string_ops.h>
Mã hóa chuỗi thành định dạng base64 an toàn trên web.
Bản tóm tắt
Tham khảo bài viết sau để biết thêm thông tin về định dạng base64: en.wikipedia.org/wiki/Base64. Chuỗi Base64 có thể có phần đệm với '=' ở cuối để mã hóa có độ dài bội số của 4. Xem phần Phần đệm của liên kết ở trên.
Web-safe có nghĩa là bộ mã hóa sử dụng - và _ thay vì + và /.
Lập luận:
- phạm vi: Một đối tượng Phạm vi
- đầu vào: Chuỗi được mã hóa.
Thuộc tính tùy chọn (xem Attrs
):
- pad: Bool xem phần đệm có được áp dụng ở cuối hay không.
Trả về:
-
Output
: Chuỗi đầu vào được mã hóa trong base64.
Các hàm tĩnh công khai |
---|
Pad (bool x) | |
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
Các hàm tĩnh công khai
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::EncodeBase64 Class Reference\n\ntensorflow::ops::EncodeBase64\n=============================\n\n`#include \u003cstring_ops.h\u003e`\n\nEncode strings into web-safe base64 format.\n\nSummary\n-------\n\nRefer to the following article for more information on base64 format: en.wikipedia.org/wiki/Base64. Base64 strings may have padding with '=' at the end so that the encoded has length multiple of 4. See Padding section of the link above.\n\nWeb-safe means that the encoder uses - and _ instead of + and /.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: Strings to be encoded.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/encode-base64/attrs#structtensorflow_1_1ops_1_1_encode_base64_1_1_attrs)):\n\n- pad: Bool whether padding is applied at the ends.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): [Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input) strings encoded in base64.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [EncodeBase64](#classtensorflow_1_1ops_1_1_encode_base64_1aa8371d913db405206464bd4233fa039d)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input)` ||\n| [EncodeBase64](#classtensorflow_1_1ops_1_1_encode_base64_1ae7ca70eace547ac3fb404fd8d983a551)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, const `[EncodeBase64::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/encode-base64/attrs#structtensorflow_1_1ops_1_1_encode_base64_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_encode_base64_1ac88d3a2d0a09fdcf5c1e0e6099a9f436) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_encode_base64_1a1232737d3ebffc26955c0a6880d67cbe) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_encode_base64_1aa8ffb94009c50322dcd63f4cfdcc1cbd)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_encode_base64_1aa42e45f58ca5cbd43c3f5f4d231fba66)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_encode_base64_1ae324f09566207fb6e063b62fd9f05085)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| [Pad](#classtensorflow_1_1ops_1_1_encode_base64_1ab5b29f0638a3ab4764ba81d707ef89da)`(bool x)` | [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/encode-base64/attrs#structtensorflow_1_1ops_1_1_encode_base64_1_1_attrs) |\n\n| ### Structs ||\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::EncodeBase64::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/encode-base64/attrs) | Optional attribute setters for [EncodeBase64](/versions/r2.3/api_docs/cc/class/tensorflow/ops/encode-base64#classtensorflow_1_1ops_1_1_encode_base64). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### EncodeBase64\n\n```gdscript\n EncodeBase64(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input\n)\n``` \n\n### EncodeBase64\n\n```gdscript\n EncodeBase64(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const EncodeBase64::Attrs & attrs\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``` \n\nPublic static functions\n-----------------------\n\n### Pad\n\n```text\nAttrs Pad(\n bool x\n)\n```"]]