Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::
ops::
SerializeSparse
#include <sparse_ops.h>
Serialize a
SparseTensor
into a
[3]
Tensor
object.
Summary
Args:
-
scope: A
Scope
object
-
sparse_indices: 2-D. The
indices
of the
SparseTensor
.
-
sparse_values: 1-D. The
values
of the
SparseTensor
.
-
sparse_shape: 1-D. The
shape
of the
SparseTensor
.
Optional attributes (see
Attrs
):
-
out_type: The
dtype
to use for serialization; the supported types are
string
(default) and
variant
.
Returns:
-
Output
: The serialized_sparse tensor.
Public static functions
|
OutType
(DataType x)
|
|
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
OutType
Attrs OutType(
DataType x
)
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 2021-08-16 UTC.
[null,null,["Last updated 2021-08-16 UTC."],[],[],null,["# tensorflow::ops::SerializeSparse Class Reference\n\ntensorflow::\nops::\nSerializeSparse\n==================================\n\n`\n#include \u003csparse_ops.h\u003e\n`\n\n\nSerialize a\n`\nSparseTensor\n`\ninto a\n`\n[3]\n`\n`\n`[Tensor](/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor)`\n`\nobject.\n\nSummary\n-------\n\n\nArgs:\n\n- scope: A [Scope](/versions/r2.6/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- sparse_indices: 2-D. The `\n indices\n ` of the `\n SparseTensor\n ` .\n- sparse_values: 1-D. The `\n values\n ` of the `\n SparseTensor\n ` .\n- sparse_shape: 1-D. The `\n shape\n ` of the `\n SparseTensor\n ` .\n\n\u003cbr /\u003e\n\n\nOptional attributes (see\n`\n`[Attrs](/versions/r2.6/api_docs/cc/struct/tensorflow/ops/serialize-sparse/attrs#structtensorflow_1_1ops_1_1_serialize_sparse_1_1_attrs)`\n`\n):\n\n- out_type: The `\n dtype\n ` to use for serialization; the supported types are `\n string\n ` (default) and `\n variant\n ` .\n\n\u003cbr /\u003e\n\n\nReturns:\n\n- `\n `[Output](/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)`\n ` : The serialized_sparse tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| ` `[SerializeSparse](#classtensorflow_1_1ops_1_1_serialize_sparse_1affc9f080117db6a59bb99bc2c3c7ff59)` (const :: `[tensorflow::Scope](/versions/r2.6/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, :: `[tensorflow::Input](/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sparse_indices, :: `[tensorflow::Input](/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sparse_values, :: `[tensorflow::Input](/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sparse_shape) ` ||\n| ` `[SerializeSparse](#classtensorflow_1_1ops_1_1_serialize_sparse_1ada17cc33b44d83186f73eff53932413e)` (const :: `[tensorflow::Scope](/versions/r2.6/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, :: `[tensorflow::Input](/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sparse_indices, :: `[tensorflow::Input](/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sparse_values, :: `[tensorflow::Input](/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sparse_shape, const `[SerializeSparse::Attrs](/versions/r2.6/api_docs/cc/struct/tensorflow/ops/serialize-sparse/attrs#structtensorflow_1_1ops_1_1_serialize_sparse_1_1_attrs)` & attrs) ` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| ` `[operation](#classtensorflow_1_1ops_1_1_serialize_sparse_1a05fa528b066fa8e55d2f402610dd81ec)` ` | ` `[Operation](/versions/r2.6/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)` ` |\n| ` `[serialized_sparse](#classtensorflow_1_1ops_1_1_serialize_sparse_1a504ec93f6c9f36404748a726b7593460)` ` | ` :: `[tensorflow::Output](/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)` ` |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------------|--------------------------|\n| ` `[node](#classtensorflow_1_1ops_1_1_serialize_sparse_1a00ce7cd46bd172befb5884bdaa85e6fa)` () const ` | ` ::tensorflow::Node * ` |\n| ` `[operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_serialize_sparse_1a99fd8653e1577d868ea4b65ad7210040)` () const ` | ` ` |\n| ` `[operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_serialize_sparse_1a8d2d1f1699d5d3ad9268cf215e87057a)` () const ` | ` ` |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[OutType](#classtensorflow_1_1ops_1_1_serialize_sparse_1a6dc0f941bd58c98382cb0b2ee2fbdbb3)` (DataType x) ` | ` `[Attrs](/versions/r2.6/api_docs/cc/struct/tensorflow/ops/serialize-sparse/attrs#structtensorflow_1_1ops_1_1_serialize_sparse_1_1_attrs)` ` |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow:: ops:: SerializeSparse:: Attrs](/versions/r2.6/api_docs/cc/struct/tensorflow/ops/serialize-sparse/attrs) | Optional attribute setters for [SerializeSparse](/versions/r2.6/api_docs/cc/class/tensorflow/ops/serialize-sparse#classtensorflow_1_1ops_1_1_serialize_sparse) . |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### serialized_sparse\n\n```scdoc\n::tensorflow::Output serialized_sparse\n``` \n\nPublic functions\n----------------\n\n### SerializeSparse\n\n```gdscript\n SerializeSparse(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input sparse_indices,\n ::tensorflow::Input sparse_values,\n ::tensorflow::Input sparse_shape\n)\n``` \n\n### SerializeSparse\n\n```gdscript\n SerializeSparse(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input sparse_indices,\n ::tensorflow::Input sparse_values,\n ::tensorflow::Input sparse_shape,\n const SerializeSparse::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### OutType\n\n```text\nAttrs OutType(\n DataType x\n)\n```"]]