tensorflow::ops::StringToNumber
#include <parsing_ops.h>
Преобразует каждую строку в входном тензоре в указанный числовой тип.
Краткое описание
(Обратите внимание, что переполнение int32 приводит к ошибке, а переполнение float — к округленному значению.)
Пример:
strings = ["5.0", "3.0", "7.0"] tf.strings.to_number(strings)
Аргументы:
- scope: Объект Scope
Необязательные атрибуты (см. Attrs):
- out_type: Числовой тип, в который следует интерпретировать каждую строку в
string_tensor.
Возвращает:
| Конструкторы и деструкторы | |
|---|---|
StringToNumber(const ::tensorflow::Scope & scope, ::tensorflow::Input string_tensor) | |
StringToNumber(const ::tensorflow::Scope & scope, ::tensorflow::Input string_tensor, const StringToNumber::Attrs & attrs) |
| Общедоступные атрибуты | |
|---|---|
operation | |
output | |
| Общедоступные функции | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Общедоступные статические функции | |
|---|---|
OutType(DataType x) | |
| Структуры | |
|---|---|
| tensorflow::ops::StringToNumber::Attrs | Необязательные параметры настройки для StringToNumber. |
Общедоступные атрибуты
operation
Operation operation
output
::tensorflow::Output output
Общедоступные функции
StringToNumber
StringToNumber( const ::tensorflow::Scope & scope, ::tensorflow::Input string_tensor )
StringToNumber
StringToNumber( const ::tensorflow::Scope & scope, ::tensorflow::Input string_tensor, const StringToNumber::Attrs & attrs )
node
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Общедоступные статические функции
OutType
Attrs OutType( DataType x )
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/string-to-number