W3cubDocs

/TensorFlow C++

tensorflow::ops::Bucketize

#include <math_ops.h>

Bucketizes 'input' based on 'boundaries'.

Summary

For example, if the inputs are boundaries = [0, 10, 100] input = [[-5, 10000] [150, 10] [5, 100]]

then the output will be output = [[0, 3] [3, 2] [1, 3]]

Arguments:

  • scope: A Scope object
  • input: Any shape of Tensor contains with int or float type.
  • boundaries: A sorted list of floats gives the boundary of the buckets.

Returns:

  • Output: Same shape with 'input', each value of input replaced with bucket index.

(numpy) Equivalent to np.digitize.

Constructors and Destructors
Bucketize(const ::tensorflow::Scope & scope, ::tensorflow::Input input, const gtl::ArraySlice< float > & boundaries)
Public attributes
output
Public functions
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const

Public attributes

output

::tensorflow::Output output

Public functions

Bucketize

 Bucketize(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  const gtl::ArraySlice< float > & boundaries
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/bucketize.html