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:
Tensorформы [2] того же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 )
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/histogram-fixed-width