tensorflow::ops::HistogramFixedWidth
#include <math_ops.h>
Возвращает гистограмму значений.
Краткое описание
Для тензора values, эта операция возвращает гистограмму ранга 1, подсчитывающую количество элементов в values, которые попадают в каждый интервал. Интервалы имеют равную ширину и определяются аргументами value_range и 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]
Аргументы:
- scope: Объект Scope
- values: Численные
Tensor. - value_range: Массив [2]
Tensorтого жеdtypeчто иvalues. Значения, которые меньше или равны value_range[0], будут сопоставлены с hist[0], значения, которые больше или равны value_range[1], будут сопоставлены с hist[-1]. - nbins: Скаляр
int32 Tensor. Количество интервалов гистограммы.
Возвращаемое значение:
| Конструкторы и деструкторы | |
|---|---|
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) |
| Публичные атрибуты | |
|---|---|
operation | |
out | |
| Публичные функции | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Публичные статические функции | |
|---|---|
Dtype(DataType x) | |
| Структуры | |
|---|---|
| tensorflow::ops::HistogramFixedWidth::Attrs | Дополнительные атрибуты-установщики для HistogramFixedWidth. |
Публичные атрибуты
operation
Operation operation
out
::tensorflow::Output out
Публичные функции
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
Публичные статические функции
Dtype
Attrs Dtype( DataType x )
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/histogram-fixed-width