tf.feature_column.bucketized_column

Represents discretized dense input bucketed by boundaries.

Used in the notebooks

Used in the tutorials

Buckets include the left boundary, and exclude the right boundary. Namely, boundaries=[0., 1., 2.] generates buckets (-inf, 0.), [0., 1.), [1., 2.), and [2., +inf).

For example, if the inputs are

boundaries = [0, 10, 100]
input tensor = [[-5, 10000]
                [150,   10]
                [5,    100]]

then the output will be