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 | |
---|---|
operation | |
output |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
Public attributes
operation
Operation operation
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
© 2020 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/versions/r2.4/api_docs/cc/class/tensorflow/ops/bucketize