Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
przepływ tensorowy:: ops:: StringStrip
#include <string_ops.h>
Usuń początkowe i końcowe białe znaki z Tensora .
Streszczenie
Argumenty:
- zakres: Obiekt Scope
- dane wejściowe:
Tensor
strunowy o dowolnym kształcie.
Zwroty:
-
Output
: Tensor
strunowy o tym samym kształcie co dane wejściowe.
Przykłady:
tf.strings.strip(["\nTensorFlow", "Biblioteka Pythona "]).numpy() array([b'TensorFlow', b'Biblioteka Pythona'], dtype=obiekt)
Atrybuty publiczne
Funkcje publiczne
węzeł
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Wyjście
operator::tensorflow::Output() const
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::StringStrip Class Reference\n\ntensorflow::ops::StringStrip\n============================\n\n`#include \u003cstring_ops.h\u003e`\n\nStrip leading and trailing whitespaces from the [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n\nSummary\n-------\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: A string [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of any shape.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A string [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of the same shape as the input.\n\n\u003cbr /\u003e\n\nExamples:\n\ntf.strings.strip(\\[\"\\\\nTensorFlow\", \" The python library \"\\]).numpy() array(\\[b'TensorFlow', b'The python library'\\], dtype=object)\n\n| ### Constructors and Destructors ||\n|---|---|\n| [StringStrip](#classtensorflow_1_1ops_1_1_string_strip_1a0d346f7d1a699725f37ddb58375eb37a)`(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)` input)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_string_strip_1a6969e477b11ca39f71a21ae5f006cc7e) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_string_strip_1a28427413e62484b63aeee55a509f19b2) | `::`[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_string_strip_1a2fd6ef98ae9fa8b948636eab9423c419)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_string_strip_1a60f09cee4031c28f02d5683d231b6c99)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_string_strip_1a65ed73f97ac9b81049cada72dbb19118)`() const ` | ` ` ` ` |\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### StringStrip\n\n```gdscript\n StringStrip(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input\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```"]]