View source on GitHub

Returns a bucketized column, with a bucket index assigned to each input.

x A numeric input Tensor or SparseTensor whose values should be mapped to buckets. For SparseTensors, the non-missing values will be mapped to buckets and missing value left missing.
bucket_boundaries The bucket boundaries represented as a rank 2 Tensor.
name (Optional) A name for this operation.

A Tensor of the same shape as x, with each element in the returned tensor representing the bucketized value. Bucketized value is in the range [0, len(bucket_boundaries)].