tensorflow::
#include <math_ops.h>
Return histogram of values.
Summary
Given the tensor values, this operation returns a rank 1 histogram counting the number of entries in values that fall into every bin. The bins are equal width and determined by the arguments value_range and nbins.
# Bins will be:  (-inf, 1), [1, 2), [2, 3), [3, 4), [4, inf)
nbins = 5
value_range = [0.0, 5.0]
new_values = [-1.0, 0.0, 1.5, 2.0, 5.0, 15]
with tf.get_default_session() as sess: hist = tf.histogram_fixed_width(new_values, value_range, nbins=5) variables.global_variables_initializer().run() sess.run(hist) => [2, 1, 1, 0, 2]
Args:
- scope: A Scope object
- values: Numeric Tensor.
- value_range: Shape [2] Tensorof samedtypeasvalues. values <= value_range[0] will be mapped to hist[0], values >= value_range[1] will be mapped to hist[-1].
- nbins: Scalar int32 Tensor. Number of histogram bins.
Returns:
| Constructors and Destructors | |
|---|---|
| HistogramFixedWidth(const ::tensorflow::Scope & scope, ::tensorflow::Input values, ::tensorflow::Input value_range, ::tensorflow::Input nbins) | |
| HistogramFixedWidth(const ::tensorflow::Scope & scope, ::tensorflow::Input values, ::tensorflow::Input value_range, ::tensorflow::Input nbins, const HistogramFixedWidth::Attrs & attrs) | 
| Public attributes | |
|---|---|
| operation | |
| out | |
| Public functions | |
|---|---|
| node() const  | ::tensorflow::Node * | 
| operator::tensorflow::Input() const  |  | 
| operator::tensorflow::Output() const  |  | 
| Public static functions | |
|---|---|
| Dtype(DataType x) | |
| Structs | |
|---|---|
| tensorflow:: | Optional attribute setters for HistogramFixedWidth. | 
Public attributes
operation
Operation operation
out
::tensorflow::Output out
Public functions
HistogramFixedWidth
HistogramFixedWidth( const ::tensorflow::Scope & scope, ::tensorflow::Input values, ::tensorflow::Input value_range, ::tensorflow::Input nbins )
HistogramFixedWidth
HistogramFixedWidth( const ::tensorflow::Scope & scope, ::tensorflow::Input values, ::tensorflow::Input value_range, ::tensorflow::Input nbins, const HistogramFixedWidth::Attrs & attrs )
node
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
Dtype
Attrs Dtype( DataType x )