Stay organized with collections
Save and categorize content based on your preferences.
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.
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
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 2020-04-20 UTC.
[null,null,["Last updated 2020-04-20 UTC."],[],[],null,["# tensorflow::ops::Bucketize Class Reference\n\ntensorflow::ops::Bucketize\n==========================\n\n`#include \u003cmath_ops.h\u003e`\n\nBucketizes 'input' based on 'boundaries'.\n\nSummary\n-------\n\nFor example, if the inputs are boundaries = \\[0, 10, 100\\] input = \\[\\[-5, 10000\\] \\[150, 10\\] \\[5, 100\\]\\]\n\nthen the output will be output = \\[\\[0, 3\\] \\[3, 2\\] \\[1, 3\\]\\]\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: [Any](/versions/r1.15/api_docs/cc/class/tensorflow/ops/any#classtensorflow_1_1ops_1_1_any) shape of [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) contains with int or float type.\n- boundaries: A sorted list of floats gives the boundary of the buckets.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): Same shape with 'input', each value of input replaced with bucket index.\n\n\u003cbr /\u003e\n\n(numpy) Equivalent to np.digitize.\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Bucketize](#classtensorflow_1_1ops_1_1_bucketize_1a104987760896f84594d21a17738a6fe1)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, const gtl::ArraySlice\u003c float \u003e & boundaries)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_bucketize_1a11d9d7e39578db3e3dfaf2ef9213ae34) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_bucketize_1aa111bb19d459f3f26ae8f03297739125) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_bucketize_1af82e929e268a0301d7ce4c41480a19e4)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_bucketize_1a7d66691237f8de46ab0c52782419cf53)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_bucketize_1aa3f697a162b180d9aa7847cb7d22dc3e)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### Bucketize\n\n```gdscript\n Bucketize(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const gtl::ArraySlice\u003c float \u003e & boundaries\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```"]]