Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::StringStrip
#include <string_ops.h>
Strip leading and trailing whitespaces from the Tensor.
Summary
Examples:
tf.strings.strip(["\\nTensorFlow", " The python library "]).numpy() array([b'TensorFlow', b'The python library'], dtype=object)
Args:
- scope: A Scope object
- input: A string
Tensor
of any shape.
Returns:
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 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.14/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n\nSummary\n-------\n\nExamples:\n\ntf.strings.strip(\\[\"\\\\\\\\nTensorFlow\", \" The python library \"\\]).numpy() array(\\[b'TensorFlow', b'The python library'\\], dtype=object)\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: A string [Tensor](/versions/r2.14/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of any shape.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A string [Tensor](/versions/r2.14/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of the same shape as the input.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [StringStrip](#classtensorflow_1_1ops_1_1_string_strip_1a0d346f7d1a699725f37ddb58375eb37a)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/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.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_string_strip_1a28427413e62484b63aeee55a509f19b2) | `::`[tensorflow::Output](/versions/r2.14/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```"]]