Save the date! Google I/O returns May 18-20 Register now

tensorflow::ops::SparseReorder

#include <sparse_ops.h>

Reorders a SparseTensor into the canonical, row-major ordering.

Summary

Note that by convention, all sparse ops preserve the canonical ordering along increasing dimension number. The only time ordering can be violated is during manual manipulation of the indices and values vectors to add entries.

Reordering does not affect the shape of the SparseTensor.

If the tensor has rank R and N non-empty values, input_indices has shape [N, R], input_values has length N, and input_shape has length R.

Arguments:

  • scope: A Scope object
  • input_indices: 2-D. N x R matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.
  • input_values: 1-D. N non-empty values corresponding to input_indices.
  • input_shape: 1-D. Shape of the input SparseTensor.

Returns:

  • Output output_indices: 2-D. N x R matrix with the same indices as input_indices, but in canonical row-major ordering.
  • Output output_values: 1-D. N non-empty values corresponding to output_indices.

Constructors and Destructors

SparseReorder(const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape)

Public attributes

operation
output_indices
output_values

Public attributes

operation

Operation operation

output_indices

::tensorflow::Output output_indices

output_values

::tensorflow::Output output_values

Public functions

SparseReorder

 SparseReorder(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input_indices,
  ::tensorflow::Input input_values,
  ::tensorflow::Input input_shape
)
{"cc_re__cc_re__cc_by_4_0": ["w::Input</a> input_values,\n  ::<a href=\"/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input\">tensorflow::Input</a> input_shape\n)</pre>\n    <div />\n  </div>\n\n    \n\n    \n  </div>\n\n  \n\n  \n    \n      \n    <devsite-page-rating position=\"footer\" selected-rating=\"0\" hover-rating-star=\"0\">\n    </devsite-page-rating>\n  \n       \n    \n    \n  \n\n  \n  \n</article>\n\n\n<devsite-content-footer class=\"nocontent\">\n  <p>Except as otherwise noted, the content of this page is licensed under the <a href=\"https://creativecommons.org/licenses/by/4.0/\">Creative Commons Attribution 4.0 License</a>, and code samples are licensed under the <a href=\"https://www.apache.org/licenses/LICENSE-2.0\">Apache 2.0 License</a>. For details, see the <a href=\"https://developers.google.com/site-policies\">Google Developers Site Policies</a>. Java is a registered trademark of Oracle and/or its affiliates.</p>\n  <p>Last updated 2020-04-20 UTC.</p>\n</devsite-content-footer>\n\n\n\n            \n          </devsite-content>\n        </main>\n        <devsite-footer-promos "]}