tfio.experimental.text.decode_libsvm
Convert Libsvm records to a tensor of label and a tensor of feature.
tfio.experimental.text.decode_libsvm(
content, num_features, dtype=None, label_dtype=None
)
Args |
content
|
A Tensor of type string . Each string is a record/row in
the Libsvm format.
|
num_features
|
The number of features.
|
dtype
|
The type of the output feature tensor. Default to tf.float32.
|
label_dtype
|
The type of the output label tensor. Default to tf.int64.
|
Returns |
features
|
A SparseTensor of the shape [input_shape, num_features] .
|
labels
|
A Tensor of the same shape as content.
|
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.
Last updated 2022-02-15 UTC.
[null,null,["Last updated 2022-02-15 UTC."],[],[]]