컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: 문자열 길이
#include <string_ops.h>
input
의 문자열 길이입니다.
요약
입력 텐서에 제공된 각 문자열의 길이를 계산합니다.
인수:
- 범위: 범위 개체
- 입력: 길이를 계산할 문자열입니다.
선택적 속성( Attrs
참조):
- 단위: 문자열 길이를 계산하기 위해 계산되는 단위입니다.
"BYTE"
(각 문자열의 바이트 수) 또는 "UTF8_CHAR"
(각 문자열의 UTF-8 인코딩 유니코드 코드 포인트 수) 중 하나입니다. unit=UTF8_CHAR
이고 input
문자열에 구조적으로 유효한 UTF-8이 포함되어 있지 않으면 결과가 정의되지 않습니다.
보고:
-
Output
: input
과 동일한 모양을 갖는 정수 텐서. 출력에는 input
의 요소별 문자열 길이가 포함됩니다.
공개 정적 함수 |
---|
Unit (StringPiece x) | |
공개 속성
공공 기능
마디
::tensorflow::Node * node() const
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
단위
Attrs Unit(
StringPiece x
)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],[],null,["# tensorflow::ops::StringLength Class Reference\n\ntensorflow::ops::StringLength\n=============================\n\n`#include \u003cstring_ops.h\u003e`\n\nString lengths of `input`.\n\nSummary\n-------\n\nComputes the length of each string given in the input tensor.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: The string for which to compute the length.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/string-length/attrs#structtensorflow_1_1ops_1_1_string_length_1_1_attrs)):\n\n- unit: The unit that is counted to compute string length. One of: `\"BYTE\"` (for the number of bytes in each string) or `\"UTF8_CHAR\"` (for the number of UTF-8 encoded Unicode code points in each string). Results are undefined if `unit=UTF8_CHAR` and the `input` strings do not contain structurally valid UTF-8.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): Integer tensor that has the same shape as `input`. The output contains the element-wise string lengths of `input`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [StringLength](#classtensorflow_1_1ops_1_1_string_length_1a7bf80700ba30572d7c7ca2b6f850eaca)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input)` ||\n| [StringLength](#classtensorflow_1_1ops_1_1_string_length_1a1a20dc90501bbdb2e17e0b5964a8eff1)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, const `[StringLength::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/string-length/attrs#structtensorflow_1_1ops_1_1_string_length_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_string_length_1a17a8867ada18bd6238863a038adb4072) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_string_length_1a3c952cda013f2825ee48c9cba19fa974) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_string_length_1a8958d29822235046d6f74f45f90f9ee2)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_string_length_1ad02392f74af341966e713678ada76cf3)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_string_length_1a75c524b5ff956f3f681cdebb8135460f)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| [Unit](#classtensorflow_1_1ops_1_1_string_length_1af57b9def6e863b9003b3fc809a13d835)`(StringPiece x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/string-length/attrs#structtensorflow_1_1ops_1_1_string_length_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::StringLength::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/string-length/attrs) | Optional attribute setters for [StringLength](/versions/r1.15/api_docs/cc/class/tensorflow/ops/string-length#classtensorflow_1_1ops_1_1_string_length). |\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### StringLength\n\n```gdscript\n StringLength(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input\n)\n``` \n\n### StringLength\n\n```gdscript\n StringLength(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const StringLength::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### Unit\n\n```text\nAttrs Unit(\n StringPiece x\n)\n```"]]